switching terraform backend to azure storage #147
@@ -17,13 +17,3 @@ jobs:
|
||||
environment_name: test
|
||||
version_number: ${{ github.run_id }}
|
||||
secrets: inherit
|
||||
|
||||
terraform:
|
||||
if: ${{ needs.changes.outputs.infrastructure == 'true' }}
|
||||
name: terraform-plan
|
||||
needs:
|
||||
- changes
|
||||
uses: ./.gitea/workflows/terraform.yaml
|
||||
with:
|
||||
environment_name: test
|
||||
secrets: inherit
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: 'Terraform'
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment_name:
|
||||
type: string
|
||||
@@ -31,15 +31,14 @@ jobs:
|
||||
|
||||
- name: Terraform init
|
||||
run: |
|
||||
terraform -chdir=./infrastructure init -reconfigure -backend-config="${{ inputs.environment_name }}.backend.tfvars" -input=false
|
||||
terraform -chdir=./infrastructure init -reconfigure -backend-config="./backend/${{ inputs.environment_name }}.backend.tfvars" -input=false
|
||||
|
||||
- name: Terraform plan
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
run: |
|
||||
terraform -chdir=./infrastructure plan -no-color -input=false
|
||||
|
||||
- name: Terraform apply
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
run: |
|
||||
terraform -chdir=./infrastructure apply -no-color -input=false
|
||||
# - name: Terraform apply
|
||||
# if: ${{ github.event_name != 'pull_request' }}
|
||||
# run: |
|
||||
# terraform -chdir=./infrastructure apply -no-color -input=false
|
||||
|
||||
Reference in New Issue
Block a user