stacks: call terraform.Validate on stack component configs #34705
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the stacks validate functionality so that it calls out to
terraform.Validate
for each component within the stack.We've updated the
terraform1
API such that the deps file and provider cache handles are now required for theValidateStackConfiguration
RPC. Follow up PRs will update the various clients with this new behaviour. This is a forward-compatible change, so we can update the clients now before the new Terraform version is released and they'll continue working with the old version of Terraform. Unfortunately, this isn't backwards compatible so any clients not updated will start erroring when calling Terraform without the new validate fields.We load the unconfigured providers in
component_config.go
, and pass them into the external providers supported byterraform.Validate
(see #34701).There are extra static validations we can do within stacks only that will arrive in follow up PRs.