Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/terraform-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on:
workflow_dispatch:
inputs:
operation:
description: 'Choose the Terraform operation (apply or destroy)'
description: 'Choose the Terraform operation'
required: true
default: 'apply'
type: choice
options:
- apply
- destroy
push:
branches:
- 'infra_main'
Expand All @@ -27,7 +31,8 @@ env:
TF_VAR_db_domain: ${{ vars.TF_DB_DOMAIN }}
TF_VAR_traefik_domain: ${{ vars.TF_TRAEFIK_DOMAIN }}
TF_VAR_cert_email: ${{ secrets.TF_CERT_EMAIL }}
TF_VAR_private_key_path: ./${{ vars.TF_KEY_PAIR_NAME }}.pem
TF_VAR_private_key_path: ${{ vars.TF_KEY_PAIR_NAME }}.pem
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}

jobs:
build-infra:
Expand All @@ -41,6 +46,7 @@ jobs:
run: |
echo "${{ secrets.PRIVATE_KEY }}" > ${{ vars.TF_KEY_PAIR_NAME }}.pem
chmod 600 ${{ vars.TF_KEY_PAIR_NAME }}.pem
working-directory: ./terraform

- name: Set up Terraform
uses: hashicorp/setup-terraform@v2
Expand Down
4 changes: 2 additions & 2 deletions ansible/compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@ networks:
volumes:
postgres_data:
secrets:
postgres_password:
file: ./POSTGRES_PASSWORD.txt
postgres_password:
environment: "POSTGRES_PASSWORD"