Skip to content

chore(): added db_password secret #10

chore(): added db_password secret

chore(): added db_password secret #10

Workflow file for this run

name: Terraform Deployment
on:
push:
branches:
- setup-workflow
jobs:
terraform:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.9.8
- 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-central-1
- name: Set DB Password as Environment Variable
run: echo "TF_VAR_db_password=${{ secrets.db_password }}" >> $GITHUB_ENV
- name: Terraform Init
run: cd terraform && terraform init
- name: Terraform Validate
run: cd terraform && terraform validate
- name: Terraform Plan
run: cd terraform && terraform plan -out=plan.tfplan
- name: Terraform Apply
run: cd terraform && terraform apply -auto-approve plan.tfplan