From 875b8a0d903a3740909e2231e2926d20c0bb1d55 Mon Sep 17 00:00:00 2001 From: noahspannbauer Date: Mon, 13 Jul 2026 11:46:41 -0500 Subject: [PATCH] switching terraform backend to azure storage --- .gitea/workflows/pull_request.yaml | 2 +- .gitea/workflows/terraform.yaml | 4 ++-- infrastructure/prod.backend.tfvars | 1 + infrastructure/test.backend.tfvars | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 infrastructure/prod.backend.tfvars create mode 100644 infrastructure/test.backend.tfvars diff --git a/.gitea/workflows/pull_request.yaml b/.gitea/workflows/pull_request.yaml index d4f26aa..884819c 100644 --- a/.gitea/workflows/pull_request.yaml +++ b/.gitea/workflows/pull_request.yaml @@ -23,7 +23,7 @@ jobs: name: terraform-plan needs: - changes - uses: ./.gitea/workflows/infrastructure.yaml + uses: ./.gitea/workflows/terraform.yaml with: environment_name: test secrets: inherit diff --git a/.gitea/workflows/terraform.yaml b/.gitea/workflows/terraform.yaml index d82fcb8..6eb7ef3 100644 --- a/.gitea/workflows/terraform.yaml +++ b/.gitea/workflows/terraform.yaml @@ -1,6 +1,6 @@ name: 'Terraform' on: - workflow_dispatch: + workflow_call: inputs: environment_name: type: string @@ -31,7 +31,7 @@ jobs: - name: Terraform init run: | - terraform -chdir=./infrastructure init -input=false + terraform -chdir=./infrastructure init -reconfigure -backend-config="${{ inputs.environment_name }}.backend.tfvars" -input=false - name: Terraform plan if: ${{ github.event_name == 'pull_request' }} diff --git a/infrastructure/prod.backend.tfvars b/infrastructure/prod.backend.tfvars new file mode 100644 index 0000000..d9a86a6 --- /dev/null +++ b/infrastructure/prod.backend.tfvars @@ -0,0 +1 @@ +container_name = "tfstate-flying-prod" \ No newline at end of file diff --git a/infrastructure/test.backend.tfvars b/infrastructure/test.backend.tfvars new file mode 100644 index 0000000..42299b4 --- /dev/null +++ b/infrastructure/test.backend.tfvars @@ -0,0 +1 @@ +container_name = "tfstate-flying-test" \ No newline at end of file