-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add terraform configuration to require a plan file when applying #15263
Comments
Terraform 0.10 has this behavior, just slightly different. Could you take a look at the upgrade guide and see if the 0.10 behavior would satisfy you? At this time, 0.10 is not yet released. |
Ahh yes, thanks for pointing that out, Seth. The behavior Seth is pointing at in 0.10 is to support an interactive mode for I expect that as of 0.10 this won't address what you want here because auto-approving will still be the default. However, in future we plan to make it default to false, specifically to avoid the problem you describe here of accidentally applying changes blindly, while retaining the convenience of using |
Ah this is cool. Any chance we can have a config setting somewhere to set |
I can see where you are coming from with that, but I don't really want to go there just because it creates more surface area for us to test, and another thing to deprecate and phase out, etc. I'm hoping we can get the default changed after not too long, so I'd ask for patience here while we get through this deprecation cycle and then we can settle into a nice end state. |
@kamalmarhubi You can get the behavior of "always disable auto-approval" by setting an environment variable to pass the flag to |
Hi all! In Terraform 0.11.0 the default for I think this addresses the original motivation for this issue, albeit in a different way than was originally suggested, so I'm going to close this. Thanks for your patience while we worked through the deprecation cycle for the old workflow. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
At my workplace, we prefer running
terraform plan -out somefile
before then runningterraform apply somefile
. However, the default state is that a bareterraform apply
will go through. It would be ideal to forbidterraform apply
without a plan.This could go in the
terraform
configuration block so that we can include it in our repo and require it across all developers. Perhaps something likeTerraform Version
Terraform v0.9.4
Expected Behavior
I can make
terraform apply
without a plan issue an error or warning.Actual Behavior
I cannot make
terraform apply
without a plan issue an error or warning.Steps to Reproduce
N/A
The text was updated successfully, but these errors were encountered: