Closed stgraber closed 3 weeks ago
Terraform allows for configuration to be set to NULL. This is generally assumed to be equivalent to not having put the configuration line in question and is particularly useful when dealing with conditional behaviors.
A couple of examples:
resource "incus_network" "this" { name = "foo" config = { "ipv4.address" = var.deploy == "production" ? "none" : null } } resource "incus_profile" "this" { name = "foo" config = { "environment.http_proxy" = var.deploy == "production" ? "http://my-proxy:3128" : null "environment.https_proxy" = var.deploy == "production" ? "http://my-proxy:3128" : null } }
To handle this properly, a few changes are needed:
That'd probably make sense. I never played with the test infrastructure yet, I'll have to look at how that works.
finally got it passing :)
Terraform allows for configuration to be set to NULL. This is generally assumed to be equivalent to not having put the configuration line in question and is particularly useful when dealing with conditional behaviors.
A couple of examples:
To handle this properly, a few changes are needed: