Skip to content

Quote .tfvars variable values #12

Quote .tfvars variable values

Quote .tfvars variable values #12

Workflow file for this run

name: Connect to AWS role
on:
push:
branches:
- main
- develop
- feature/*
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
deploy:
environment: production
runs-on: ubuntu-latest
steps:
- name: Clone the Git repository
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/[email protected]
with:
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
- name: Terraform Format
run: terraform fmt -check
- name: Terraform Init
run: |
terraform init \
-backend-config="bucket=${{ secrets.AWS_S3_TERRAFORM_STATE_BUCKET_NAME }}" \
-backend-config="key=${{ github.ref_name }}" \
-backend-config="region=${{ env.AWS_REGION }}"
working-directory: ./terraform
- name: Terraform Plan
run: terraform plan -var-file=.terraform/production.tfvars
working-directory: ./terraform