terraform-example-foundation
terraform-example-foundation copied to clipboard
Enforce expected output keys of each stage in the test
TL;DR
With https://github.com/terraform-google-modules/terraform-example-foundation/pull/782 we now use remote state. Stages maybe dependent on the previous states output and if any output key is changed unknowingly we won't will waste build time until a remote data call tries to pull the old key and fails. T
To prevent these kind of failures and enforce stronger guarantees, I propose we add validation at the end of each stage to enforce all expected output keys are present. We could likely use https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/tree/master/infra/blueprint-test/pkg/golden to create a golden json file with all expected keys and assert at the end of each stage.
Terraform Resources
No response
Detailed design
No response
Additional information
No response