Open nitrocode opened 3 years ago
same goes for values = [ ]
. When I try this:
values = [
file("settings/values.yaml"),
fileexists("settings/helm/${var.environment}/values.yaml") ? file("settings/helm/${var.environment}/values.yaml") : null,
]
I got Null values are not allowed for this attribute value.
if the second file not exist
Imho, I'd expect Helm provider to set a value as passed to mimic the --set env.DISABLE_POLLING=null
behavior. Alas, it's not possible with set {}
directive.
@jnmcfly instead of null
, an empty string can be used and surrounded by compact()
values = compact([
file("${path.module}/settings/values.yaml"),
fileexists("${path.module}/settings/helm/${var.environment}/values.yaml") ? file(
"settings/helm/${var.environment}/values.yaml"
) : "",
])
@anapsix agreed! The helm provider should mimic the --set
directive
Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you!
Terraform, Provider, Kubernetes and Helm Versions
Affected Resource(s)
helm_release
Terraform Configuration Files
Debug Output
NOTE: In addition to Terraform debugging, please set HELM_DEBUG=1 to enable debugging info from helm.
Panic Output
Steps to Reproduce
terraform apply
Expected Behavior
The helm_release resource should prevent any
set
s if the value isnull
Actual Behavior
Using null caused a terraform error. The workaround of using
dynamic
eliminates the error and does what's expected.Important Factoids
N/A
References
N/A
Community Note