ci: add concurrency group and lock timeout to terraform jobs
This commit is contained in:
@@ -248,6 +248,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-and-integration-test
|
||||
if: github.event_name == 'pull_request'
|
||||
concurrency:
|
||||
group: terraform
|
||||
cancel-in-progress: false
|
||||
defaults:
|
||||
run:
|
||||
working-directory: infra/terraform
|
||||
@@ -271,7 +274,7 @@ jobs:
|
||||
run: terraform init
|
||||
|
||||
- name: Terraform Plan
|
||||
run: terraform plan -no-color
|
||||
run: terraform plan -no-color -lock-timeout=5m
|
||||
env:
|
||||
TF_VAR_aws_account_id: ${{ secrets.TF_VAR_AWS_ACCOUNT_ID }}
|
||||
TF_VAR_aws_region: ${{ secrets.TF_VAR_AWS_REGION }}
|
||||
@@ -281,6 +284,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: publish
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
concurrency:
|
||||
group: terraform
|
||||
cancel-in-progress: false
|
||||
defaults:
|
||||
run:
|
||||
working-directory: infra/terraform
|
||||
@@ -304,7 +310,7 @@ jobs:
|
||||
run: terraform init
|
||||
|
||||
- name: Terraform Apply
|
||||
run: terraform apply -auto-approve
|
||||
run: terraform apply -auto-approve -lock-timeout=5m
|
||||
env:
|
||||
TF_VAR_aws_account_id: ${{ secrets.TF_VAR_AWS_ACCOUNT_ID }}
|
||||
TF_VAR_aws_region: ${{ secrets.TF_VAR_AWS_REGION }}
|
||||
|
||||
Reference in New Issue
Block a user