switching terraform backend to azure storage
This commit is contained in:
@@ -23,7 +23,7 @@ jobs:
|
|||||||
name: terraform-plan
|
name: terraform-plan
|
||||||
needs:
|
needs:
|
||||||
- changes
|
- changes
|
||||||
uses: ./.gitea/workflows/infrastructure.yaml
|
uses: ./.gitea/workflows/terraform.yaml
|
||||||
with:
|
with:
|
||||||
environment_name: test
|
environment_name: test
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: 'Terraform'
|
name: 'Terraform'
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
environment_name:
|
environment_name:
|
||||||
type: string
|
type: string
|
||||||
@@ -31,7 +31,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Terraform init
|
- name: Terraform init
|
||||||
run: |
|
run: |
|
||||||
terraform -chdir=./infrastructure init -input=false
|
terraform -chdir=./infrastructure init -reconfigure -backend-config="${{ inputs.environment_name }}.backend.tfvars" -input=false
|
||||||
|
|
||||||
- name: Terraform plan
|
- name: Terraform plan
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|||||||
1
infrastructure/prod.backend.tfvars
Normal file
1
infrastructure/prod.backend.tfvars
Normal file
@@ -0,0 +1 @@
|
|||||||
|
container_name = "tfstate-flying-prod"
|
||||||
1
infrastructure/test.backend.tfvars
Normal file
1
infrastructure/test.backend.tfvars
Normal file
@@ -0,0 +1 @@
|
|||||||
|
container_name = "tfstate-flying-test"
|
||||||
Reference in New Issue
Block a user