Skip to content

Add site-to-site VPN in AWS staging towards the Azure deployment #46

Add site-to-site VPN in AWS staging towards the Azure deployment

Add site-to-site VPN in AWS staging towards the Azure deployment #46

name: Auto - Apply changes on Merge to staging
# only trigger on pull request closed events
on:
pull_request:
types: [ closed ]
branches:
- staging
jobs:
terraform_apply:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
environment: ${{ github.base_ref }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
runs-on: ubuntu-latest
name: Auto Apply terraform code to staging
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure Terraform
uses: hashicorp/setup-terraform@v3
- name: Initialize Terraform
run: terraform init -backend-config="./${{ github.base_ref }}.config"
- name: Run Terraform Apply
run: |
terraform apply -auto-approve -var-file="${{ github.ref_name }}.tfvars"