Introduce variables for destroying things (#1625) #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Terraform' | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'terraform/**' | |
- '.github/workflows/terraform*' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'terraform/**' | |
- '.github/workflows/terraform*' | |
workflow_dispatch: | |
concurrency: | |
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
# main config | |
main: | |
name: 'main' | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: 'checkout' | |
uses: 'actions/checkout@v3' | |
- name: 'setup-terraform' | |
uses: 'hashicorp/setup-terraform@v2' | |
with: | |
terraform_version: '1.2' | |
- name: 'init' | |
working-directory: './terraform' | |
run: 'terraform init' | |
- name: 'validate' | |
working-directory: './terraform' | |
run: 'terraform validate' | |
- name: 'fmt' | |
working-directory: './terraform' | |
run: 'terraform fmt -diff -check' | |
# alerting | |
alerting: | |
name: 'alerting' | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: 'checkout' | |
uses: 'actions/checkout@v3' | |
- name: 'setup-terraform' | |
uses: 'hashicorp/setup-terraform@v2' | |
with: | |
terraform_version: '1.2' | |
- name: 'init' | |
working-directory: './terraform/alerting' | |
run: 'terraform init' | |
- name: 'validate' | |
working-directory: './terraform/alerting' | |
run: 'terraform validate' | |
- name: 'fmt' | |
working-directory: './terraform/alerting' | |
run: 'terraform fmt -diff -check' |