Comment by cube2222
6 days ago
Yep, as of yesterday’s 1.11 release it’s supported!
That also includes a new “enabled” meta argument, so you don’t have to hack around conditional resources with count = 0.
[0]: https://opentofu.org/blog/opentofu-1-11-0/
Disclaimer: affiliated with the project
How do you migrate from count/for_each to `enabled` ?
You can just switch from `count = 1` to `enabled = true` (or vice-versa, works back-and-forth) for a resource and tofu will automatically move it next time you apply.
It's pretty seamless.
That's cool! We'll still need to change all of the references to `resource[0]`, right? Or does tofu obviate that need as well?
1 reply →
And you don't get the annoying array form for the resulting resource with the `enabled` syntax, right?
EDIT: Oh just realized the sibling asked the same, but the doc doesn't state that clearly, although it seems to me that the doc implies that yeah, it doesn't use the array form anymore.
2 replies →
Amazing. Good work !
Damn, might finally be able to use it. The lack of ephemeral values was a major blocker.