Skip to content
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

terraform apply should be against a saved plan #1301

Closed
tammersaleh opened this issue Feb 26, 2020 · 3 comments
Closed

terraform apply should be against a saved plan #1301

tammersaleh opened this issue Feb 26, 2020 · 3 comments
Assignees

Comments

@tammersaleh
Copy link
Contributor

Our cg-provision pipeline (also aws-broker and maybe others) is configured to run terraform plan, and in a later job run terraform apply. However, that apply doesn't make use of a saved plan file. This means infrastructure drift during plan review and before the apply job is triggered can result in unexpected and possibly destructive changes.

Instead, we should save the plan output from the terraform plan job and make use of it in the apply job.

@tammersaleh tammersaleh added the unprioritized Emergent issues that need to be prioritized. label Mar 4, 2020
@karareinsel karareinsel removed the unprioritized Emergent issues that need to be prioritized. label Mar 4, 2020
@tammersaleh
Copy link
Contributor Author

@tammersaleh
Copy link
Contributor Author

I was possibly bit by this today. Triggered a concourse build against a commit that had already run, and somehow that build ended up rebuilding a database. I have no idea what changed, since the apply used -autoapprove. Maybe it was fine?

@tammersaleh
Copy link
Contributor Author

Closing in favor of cloud-gov/terraform-provision#741

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

No branches or pull requests

2 participants