Skip to content

Commit

Permalink
Fix to TF state key variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
johncollinson2001 authored Sep 16, 2024
1 parent b64e7f7 commit f5f3085
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
terraform_wrapper: false

- name: Terraform Init
run: terraform init -backend=true -backend-config="resource_group_name=$TF_STATE_RESOURCE_GROUP" -backend-config="storage_account_name=$TF_STATE_STORAGE_ACCOUNT" -backend-config="container_name=github-actions" -backend-config="key=$TF_STATE_KEY.tfstate"
run: terraform init -backend=true -backend-config="resource_group_name=$TF_STATE_RESOURCE_GROUP" -backend-config="storage_account_name=$TF_STATE_STORAGE_ACCOUNT" -backend-config="container_name=github-actions" -backend-config="key=$TF_STATE_KEY"
working-directory: infrastructure
env:
ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
Expand All @@ -37,7 +37,7 @@ jobs:
ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
TF_STATE_RESOURCE_GROUP: ${{ secrets.TF_STATE_RESOURCE_GROUP }}
TF_STATE_STORAGE_ACCOUNT: ${{ secrets.TF_STATE_STORAGE_ACCOUNT }}
TF_STATE_KEY: ${{ github.head_ref != '' && github.head_ref || github.ref }}
TF_STATE_KEY: "${{ github.head_ref != '' && github.head_ref || github.ref }}.tfstate"

- name: Terraform Validate
run: terraform validate
Expand Down

0 comments on commit f5f3085

Please sign in to comment.