ovotech / circleci-orbs

CircleCI Orbs
MIT License
52 stars 37 forks source link

Support timeout for Terraform #509

Open stephen-harris opened 1 year ago

stephen-harris commented 1 year ago

A number of teams are switching to using OIDC session tokens for their pipelines. Unlike the previously used IAM credentials these have a short duration (default 1 hour). If Terraform apply takes longer than the duration of the session token it will not be able to update remote state.

Although this is rare (typically when starting up a new environment) it is time consuming for teams to recover.

This PR adds the option to gracefully terminate Terraform after the specified period, and thus ensuring it does not try to run beyond the lifespan of the session tokens.