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.
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.