Skip to content

Commit

Permalink
use variables
Browse files Browse the repository at this point in the history
  • Loading branch information
agjmills committed May 4, 2024
1 parent 67c764a commit 6a6d18a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::932191515807:role/github-oidc/github-deployment
aws-region: ${{ AWS_REGION }}
role-to-assume: arn:aws:iam::${{ AWS_ACCOUNT_ID }}:role/github-oidc/github-deployment

- name: Initialize Terraform
run: terraform init -backend-config="bucket=tf-state-eu-west-2-932191515807" -backend-config="key=alexmills-uk/aws-organisation.tfstate" -backend-config="dynamodb_table=tf-state-eu-west-2-932191515807"
run: terraform init -backend-config="bucket=tf-state-${{ AWS_REGION }}-${{ AWS_ACCOUNT_ID }}" -backend-config="key=${{ GITHUB_REPOSITORY }}.tfstate" -backend-config="dynamodb_table=tf-state-${{ AWS_REGION }}-${{ AWS_ACCOUNT_ID }}"

- name: Plan Terraform
run: terraform plan -out=tfplan
Expand Down

0 comments on commit 6a6d18a

Please sign in to comment.