Fix terraform root main.tf which used non existing variable #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Deploy to Azure' | |
on: | |
push: | |
branches: | |
- '*' # Deploy all branches | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 'Login to Azure' | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: 'Setup Terraform' | |
uses: hashicorp/setup-terraform@v1 | |
- name: 'Terraform Init' | |
run: terraform init | |
working-directory: ./terraform | |
- name: 'Terraform Format' | |
run: terraform fmt -check | |
working-directory: ./terraform | |
- name: 'Terraform Plan' | |
run: terraform plan | |
working-directory: ./terraform | |
env: | |
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} | |
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} | |
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} | |
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} | |
TF_VAR_branch_name: ${{ github.ref_name }} | |
- name: 'Terraform Apply' | |
run: terraform apply -auto-approve | |
working-directory: ./terraform | |
env: | |
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} | |
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} | |
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} | |
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} | |
TF_VAR_branch_name: ${{ github.ref_name }} |