generated from cloudposse/terraform-example-module
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Found a bug? Maybe our Slack Community can help.
Describe the Bug
There are times that you may want to add a list of values using a set operation. For example, if the list of values were sensitive. You would want to use set_sensitive and generally keep sensitive values out of set and values. By keeping secrets out of those inputs, the user will be able to see the full list of values (minus secrets) in the terraform plan. If secrets remain in set or values, then the plan will be hidden from the user under (sensitive).
See references for how to do this.
locals {
# simple list
fruits = join(",", [
"banana",
"apple",
"strawberry",
])
# list where some items contain a comma and those commas need to be escaped via a double backslash
fruits_commas = join(",", [
"banana\\,pears\\,grapes:somevalue",
"apple\\,strawberry:somevalue",
])
}
resource helm_release default {
# ...
set_sensitive {
name = "controller.service.loadBalancerSourceRanges"
value = "{${local.fruits}"
}
set_sensitive {
name = "controller.service.loadBalancerSourceRanges"
value = "{${local.fruits_commas}"
}
}References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request