switching terraform backend to azure storage #147

Merged
noah merged 4 commits from 146-switch-terraform-backend into main 2026-07-13 12:51:25 -04:00
5 changed files with 11 additions and 23 deletions

View File

@@ -17,13 +17,3 @@ jobs:
environment_name: test environment_name: test
version_number: ${{ github.run_id }} version_number: ${{ github.run_id }}
secrets: inherit secrets: inherit
terraform:
if: ${{ needs.changes.outputs.infrastructure == 'true' }}
name: terraform-plan
needs:
- changes
uses: ./.gitea/workflows/infrastructure.yaml
with:
environment_name: test
secrets: inherit

View File

@@ -31,15 +31,14 @@ jobs:
- name: Terraform init - name: Terraform init
run: | run: |
terraform -chdir=./infrastructure init -input=false terraform -chdir=./infrastructure init -reconfigure -backend-config="./backend/${{ inputs.environment_name }}.backend.tfvars" -input=false
- name: Terraform plan - name: Terraform plan
if: ${{ github.event_name == 'pull_request' }}
run: | run: |
terraform -chdir=./infrastructure plan -no-color -input=false terraform -chdir=./infrastructure plan -no-color -input=false
- name: Terraform apply # - name: Terraform apply
if: ${{ github.event_name != 'pull_request' }} # if: ${{ github.event_name != 'pull_request' }}
run: | # run: |
terraform -chdir=./infrastructure apply -no-color -input=false # terraform -chdir=./infrastructure apply -no-color -input=false

View File

@@ -0,0 +1 @@
container_name = "tfstate-flying-prod"

View File

@@ -0,0 +1 @@
container_name = "tfstate-flying-test"

View File

@@ -16,12 +16,9 @@ terraform {
} }
} }
backend "remote" { backend "azurerm" {
hostname = "app.terraform.io" resource_group_name = "noahspan"
organization = "noahspan" storage_account_name = "noahspanterraform"
key = "terraform.tfstate"
workspaces {
prefix = "noahspan-"
}
} }
} }