Skip to content

Adjust code_update pipeline (#42) #21

Adjust code_update pipeline (#42)

Adjust code_update pipeline (#42) #21

name: Terraform Update
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-north-1
- name: Set up Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 1.5.7
- name: Terraform Apply
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.event.before != '0000000000000000000000000000000000000000' && github.event.after != '0000000000000000000000000000000000000000'
run: |
cd infra
terraform init -input=false
terraform apply -auto-approve
- name: Terraform Show
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.event.before != '0000000000000000000000000000000000000000' && github.event.after != '0000000000000000000000000000000000000000'
run: |
cd infra
terraform show -json > terraform.tfstate.json