chore: move to export pg connection string

This commit is contained in:
2025-09-27 13:50:00 +10:00
parent 4c041e1192
commit c98147a1fc
2 changed files with 2 additions and 9 deletions

View File

@@ -28,7 +28,6 @@ jobs:
proxmox_api_token_secret = "${{ secrets.PVE_API_TOKEN_SECRET }}" proxmox_api_token_secret = "${{ secrets.PVE_API_TOKEN_SECRET }}"
ssh_key = "${{ secrets.SSH_PRIVATE_KEY }}" ssh_key = "${{ secrets.SSH_PRIVATE_KEY }}"
passphrase = "${{ secrets.SSH_PASSPHRASE }}" passphrase = "${{ secrets.SSH_PASSPHRASE }}"
PG_CONN_STR = "${{ secrets.PG_CONN_STR }}"
EOF EOF
- name: Setup Opentofu - name: Setup Opentofu
@@ -46,6 +45,7 @@ jobs:
- name: Opentofu Plan - name: Opentofu Plan
id: plan id: plan
run: | run: |
export PG_CONN_STR="${{ secrets.PG_CONN_STR }}"
tofu plan -out=tfplan -detailed-exitcode tofu plan -out=tfplan -detailed-exitcode
- name: Opentofu Apply - name: Opentofu Apply

View File

@@ -11,9 +11,7 @@ terraform {
} }
} }
backend "pg" { backend "pg" {}
conn_str = var.PG_CONN_STR
}
encryption { encryption {
key_provider "pbkdf2" "mykey" { key_provider "pbkdf2" "mykey" {
passphrase = var.passphrase passphrase = var.passphrase
@@ -66,11 +64,6 @@ variable "passphrase" {
sensitive = true sensitive = true
} }
variable "PG_CONN_STR" {
type = string
sensitive = true
}
provider "proxmox" { provider "proxmox" {
pm_api_url = var.proxmox_api_url pm_api_url = var.proxmox_api_url
pm_user = "root@pam" pm_user = "root@pam"