Skip to content

feat: allow disabling state lock in Terraform operations#26

Draft
Laffs2k5 wants to merge 5 commits intomainfrom
no-lock
Draft

feat: allow disabling state lock in Terraform operations#26
Laffs2k5 wants to merge 5 commits intomainfrom
no-lock

Conversation

@Laffs2k5
Copy link
Copy Markdown
Contributor

changes

Introduce options to disable state locking during terraform init and terraform plan operations. Update CI workflow to allow parallel execution of workflows when infrastructure changes are not involved, while maintaining state locking for critical operations.

details

  • Allow disabling state lock during terraform init.
  • Default state lock behavior updated for terraform plan.
  • New concurrency strategy for CI workflows based on infrastructure changes.
  • Enable destruction of resources from scheduled events.

new concurrency strategy

for workflow runs where infra will potentially be changed, ie. goals include any of: [all, apply, apply-on-pr, destroy, destroy-on-pr], concurrency is as before: one wf run per environment active at a time.

for workflow runs where infra will not be changed: allow running all wf runs in paralell. to achieve this terraform's backend state locking is disabled in these cases.

commits

  • feat(ci workflow): new concurrency strategy
  • feat(ci workflow): allow destroy to be started from schedule event
  • feat: terraform-init: default to not lock state
  • feat: terraform-plan: allow disabling state lock

init operations only actually need state locking when migrating state between backends. still possible to enable state locking when needed.
for workflow runs where infra will potentially be changed, ie. goals include any of: [all, apply, apply-on-pr, destroy, destroy-on-pr], concurrency is as before: one wf run per environment active at a time.

for workflow runs where infra will _not_ be changed: allow running all wf runs in paralell. to achieve this terraform's backend state locking is disabled in these cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant