I was using locals and optional variable fields to define fallback placeholders if module variable is not explicitly provided.
While this was working in the Terraform 0.14.5, this does not work anymore in Tf 1.0.3
So... but... do i really need that fallback in the reusable module?
Take a look at libvirt-pool example? What if the name is explicitly required no matter what? User of the module can then use random_id/pet if he wants so. Or count meta attribute to make instance name unique.
If i set some placeholder, then i am making some "magic" variable... which could confuse users.
I was using
localsand optional variable fields to define fallback placeholders if module variable is not explicitly provided.While this was working in the Terraform 0.14.5, this does not work anymore in Tf 1.0.3
So... but... do i really need that fallback in the reusable module?
Take a look at
libvirt-poolexample? What if thenameis explicitly required no matter what? User of the module can then use random_id/pet if he wants so. Orcountmeta attribute to make instance name unique.If i set some placeholder, then i am making some "magic" variable... which could confuse users.