tfutils/tfscaffold

Any plans to get round "Value for undeclared variable" in future releases

alepeltier opened this issue · 5 comments

Hello,

We're using tfscaffold along with Terraform 0.12.6. Tf 12 returns the following warning when we run a component.

Warning: Value for undeclared variable
on ...../terraform/etc/env_eu-west-1_staging.tfvars line 28:
28: service_plugin_list = [
29: "key-auth",
30: "syslog"
31: ]
The root module does not declare a variable named "service_plugin_list". To
use this value, add a "variable" block to the configuration.
Using a variables file to set an undeclared variable is deprecated and will
become an error in a future release. If you wish to provide certain "global"
settings to all configurations in your organization

I'm using a standard setup of an env file containing variables for multiple components. Is there any plan to change how tfscaffold works to get around how terraform will be handling environment variables?

Also having this issue

I am working very hard on addressing this issue with hashicorp. I've spoken directly with several of the people concerned. I have hope that they will change it from a deprecation to an optional flag. if they don't, and they continue with the intent of deprecating it completely, the only option will be to wipe the explicitly declare all environment variables whether used or not for every component, or something rather hacky in scaffold to detect declared variables and only passed those that have been declared, which is the solution I'd rather avoid.

@Zordrak brilliant thank you for the update. I'm looking forward to hearing how HashiCorp handles it.