-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (30 loc) · 935 Bytes
/
terraform-validate.yml
File metadata and controls
38 lines (30 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Terraform Validation
on:
push:
branches: [ main, develop ]
paths: [ '**.tf', '**.yml' ]
pull_request:
branches: [ main, develop ]
paths: [ '**.tf', '**.yml' ]
jobs:
terraform-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: ~1.5
- name: Terraform Format Check
run: terraform fmt -check -recursive
- name: Terraform Init
run: terraform init
- name: Terraform Validate
run: terraform validate
- name: Terraform Plan (Dry Run)
run: terraform plan -lock=false -input=false
env:
TF_VAR_dbt_account_id: 0
TF_VAR_dbt_token: dummy
TF_VAR_dbt_host_url: https://cloud.getdbt.com
TF_VAR_yaml_file: ./projects/demo/demo.yml