tfscaffold icon indicating copy to clipboard operation
tfscaffold copied to clipboard

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

Open alepeltier opened this issue 6 years ago • 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?

alepeltier avatar Aug 22 '19 14:08 alepeltier

Also having this issue

JoshCarter-ops avatar Jan 29 '20 10:01 JoshCarter-ops

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 avatar Jan 29 '20 11:01 Zordrak

https://github.com/hashicorp/terraform/issues/22004

Zordrak avatar Jan 29 '20 11:01 Zordrak

https://github.com/hashicorp/terraform/pull/21697

https://github.com/hashicorp/terraform/issues/19424

Zordrak avatar Jan 29 '20 11:01 Zordrak

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

alepeltier avatar Jan 30 '20 15:01 alepeltier