This repository has been archived by the owner on Mar 18, 2024. It is now read-only.
Added missing columns (#12) #9
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 Terraform" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write | |
jobs: | |
deploy-infrastructure: | |
runs-on: ubuntu-latest | |
env: | |
TF_VAR_DB_USERNAME: ${{ secrets.DB_USERNAME }} | |
TF_VAR_DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
TF_VAR_AWS_REGION: ${{ secrets.AWS_REGION }} | |
defaults: | |
run: | |
shell: bash | |
working-directory: infrastructure | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Configure AWS credentials | |
uses: aws-actions/[email protected] | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE }} | |
role-session-name: GITHUB_ACTION_RDS | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Validate Identity with AWS | |
run: aws sts get-caller-identity | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
- name: Initialize Terraform | |
id: init | |
run: terraform init | |
- name: Generate infrastructure plan | |
id: plan | |
run: terraform plan -out=.tfplan | |
- name: Apply infrastructure plan | |
id: apply | |
run: terraform apply .tfplan |