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] Support lock-timeout option #113

Open
steinybot opened this issue Apr 3, 2020 · 1 comment
Open

[terraform] Support lock-timeout option #113

steinybot opened this issue Apr 3, 2020 · 1 comment

Comments

@steinybot
Copy link

It would be nice to have support for the lock-timeout option.

I have two workflows continuous_integration (which does a plan) and continuous_deployment (does an apply). The CI workflow runs on all branches. The CD workflow only runs on master and it is also triggered via the API from other builds which trigger a redeploy. When the build runs on master it runs both of these workflows concurrently and one of them will always fail as it cannot get lock because the other one has it. I need to be able to set the lock timeout so that they will retry.

@bamarch
Copy link
Contributor

bamarch commented Apr 7, 2020

I can see why this would be very useful, especially if your CI/CD solution does not give you the ability to run jobs exclusively, or specify concurrency etc.

All the terraform commands you're using (implicit: init, explicit: plan,apply) support this parameter:

-lock-timeout=0s    Duration to retry a state lock.

So adding this as a parameter and passing it through sounds good to me :)

I'll like to take a crack at this - but sadly won't have the time in the short term. Also, eng-ops are very low on resources at the moment after some changes that impacted the team.

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