Stage Progression and Terraform "undeclared variable" warnings #2028
Replies: 2 comments 2 replies
-
This is completely fine, if a bit disconcerting at first. :) The FAST stage model leverages the concept of interfaces, where producers -- earlier stages -- spit out data (an output interface) which is guaranteed to always exist, and consumers -- later stages in the chain -- consume whatever they need from it (their input interface). There's very little value and a lot of overhead in forcing consumers to accept the entire output interface, so we don't do that and this is the reason for the warnings your are seeing. Just ignore them. :) |
Beta Was this translation helpful? Give feedback.
-
"Forcing consumers to accept the whole output interface isn't very useful and can cause a lot of unnecessary work, so we avoid doing that. That's why you're seeing those warnings. You can safely ignore them." |
Beta Was this translation helpful? Give feedback.
-
I would like to understand if terraform warnings on "undeclared variables" based on previous stage json output should be of concern and if so defined in my current stages variables.tf.
Case: I completed the bootstrap stage and moved to resman stage. I imported the "0-bootstrap.auto.tfvars.json" via gcloud alpha storage command. I updated my tfvars with my custom configuration and ran terraform init, plan, then apply. In my terraform apply I get the "Warning: Value for undeclared variable" due to the "logging" variable defined in my json but no variable block defined.
I am able to move past the warning but I am wondering if this should be defined or not. I know the "logging" variables created in bootstrap stage and passed via the json are the default created in bootstrap stage.
Thoughts from the community?
Beta Was this translation helpful? Give feedback.
All reactions