Skip to content

Commit 7e13cc6

Browse files
committed
cd: change var location
1 parent 4345512 commit 7e13cc6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/terraform.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ jobs:
1010
terraform:
1111
runs-on: ubuntu-latest
1212

13+
env:
14+
AWS_REGION: sa-east-1
15+
TERRAFORM_S3_STATEFILE_BUCKET: buildrun-sa-east-1-terraform-s3-statefile
16+
TERRAFORM_DYNAMODB_LOCK_TABLE: buildrun-terraform-state-lock
17+
1318
defaults:
1419
run:
1520
shell: bash
@@ -26,10 +31,10 @@ jobs:
2631
- name: Terraform Init
2732
run: |
2833
cd infra && terraform init \
29-
-backend-config="bucket=$TERRAFORM_S3_STATEFILE_BUCKET" \
34+
-backend-config="bucket=${{ env.TERRAFORM_S3_STATEFILE_BUCKET }}" \
3035
-backend-config="${{ github.event.repository.name }}" \
31-
-backend-config="region=$AWS_REGION" \
32-
-backend-config="dynamodb_table=$TERRAFORM_DYNAMODB_LOCK_TABLE"
36+
-backend-config="region=${{ env.AWS_REGION }}" \
37+
-backend-config="dynamodb_table=${{ env.TERRAFORM_DYNAMODB_LOCK_TABLE }}"
3338
3439
- name: Terraform Validate
3540
run: terraform validate

0 commit comments

Comments
 (0)