Files
noahspan-flying/.gitea/workflows/terraform.yaml
noahspannbauer a54105e8e5
All checks were successful
Pull Request / changes (pull_request) Successful in 22s
Pull Request / build-and-test (pull_request) Has been skipped
switching terraform backend to azure storage
2026-07-13 11:50:31 -05:00

44 lines
1.3 KiB
YAML

name: 'Terraform'
on:
workflow_dispatch:
inputs:
environment_name:
type: string
jobs:
terraform:
runs-on: ubuntu-latest
environment:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
infrastructure
- name: Get Secrets from Infisical
uses: Infisical/secrets-action@v1.0.16
with:
domain: ${{ secrets.INFISICAL_DOMAIN }}
client-id: ${{ secrets.INFISICAL_CLIENT_ID }}
client-secret: ${{ secrets.INFISICAL_CLIENT_SECRET }}
project-slug: ${{ secrets.INFISICAL_PROJECT_SLUG }}
env-slug: ${{ inputs.environment_name }}
secret-path: /flying/terraform
- name: Setup Terraform
uses: hashicorp/setup-terraform@v4
- name: Terraform init
run: |
terraform -chdir=./infrastructure init -reconfigure -backend-config="./backend/${{ inputs.environment_name }}.backend.tfvars" -input=false
- name: Terraform plan
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