|
|
|
|
|
by bloopernova
770 days ago
|
|
Are there any plans for a conditional way to enable/disable modules that doesn't use "count"? For example: # current method
module "foo" {
count = var.enable_foo ? 1 : 0
}
# better?
module "bar" {
enabled = var.enable_bar
}
Preconditions and postconditions fail the apply run if their condition doesn't validate, so those can't be used.I'd also really like to be able to say in an output block, "this value doesn't have to exist, only display it if its parent module is enabled", again without the "count" attribute. |
|
There's a bunch of nontrivial technical complexity though, because of how OpenTofu currently works.
[0]: https://github.com/opentofu/opentofu/issues/1306
[1]: https://github.com/opentofu/opentofu/issues/1496