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