CircleCI-Public / terraform-orb

Deploy your infrastructure via a CircleCI pipeline using the Terraform orb. Integrate Infrastructure-as-Code (IaC) to help provision and manage any cloud, infrastructure, or service of your choice.
https://circleci.com/orbs/registry/orb/circleci/terraform
MIT License
10 stars 44 forks source link

Add the ability to specify the lock timeout on terraform plan and apply #82

Closed mark-russell-bossanova closed 5 days ago

mark-russell-bossanova commented 2 years ago

Is your feature request related to a problem? Please describe. I have my terraform state files on Google. I have run into situations where some one is running a terraform apply on their desk and CircleCi is running a build. This causes a build failure because CircleCi can not get the terraform remote lock. The default amount of wait time to get the lock is 0s.

Describe the solution you'd like I would like to be able to add a -lock-timeout=sometimeout or pass a lock timeout to the parameter to terraform commands/jobs plan and apply. This way I would be able to have terraform wait for a specified amount of time to get the lock. This would avoid build failures in most cases.

Describe alternatives you've considered I have looked through the code and since this has to be a command line parameter I see no way to pass it to the orb to add the parameter to terraform command

Additional context With some guidance I will be willing to make a pull request for this.

mark-russell-bossanova commented 2 years ago

I will work this in to my next quarter's Goals.

marboledacci commented 5 days ago

Looks like this was added a while ago on #92