Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Make Terraform validate template_file on plan phase #57

Open
ghost opened this issue Mar 20, 2019 · 0 comments
Open

Make Terraform validate template_file on plan phase #57

ghost opened this issue Mar 20, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 20, 2019

This issue was originally opened by @fcappi as hashicorp/terraform#20770. It was migrated here as a result of the provider split. The original body of the issue is below.


Current Terraform Version

terraform -v
Terraform v0.11.10

Use-cases

Currently, when there is an issue with a template file like having a variable being used in the file that was not specified as input, terraform only fails at the apply phase. Then you have to destroy the infrastructure that is already created so far, fix the issue in the template file and then apply again. This can be time-consuming if you are creating many resources.

Attempted Solutions

Currently, you have to terraform destroy, fix the file and then terraform applyagain

Proposal

I think it would be great if Terraform validates the template files before starting applying all the changes, this way we can make sure it will not break during infrastructure creation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant