-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (31 loc) · 997 Bytes
/
terraform-example.yml
File metadata and controls
33 lines (31 loc) · 997 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
name: Terraform Example
on:
push:
paths:
- '.github/workflows/terraform-example.yml'
- 'terraform-example/**'
pull_request:
paths:
- '.github/workflows/terraform-example.yml'
- 'terraform-example/**'
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.7.5
- name: Terraform Init (example)
run: terraform -chdir=terraform-example init -backend=false
- name: Terraform Validate (example)
run: terraform -chdir=terraform-example validate
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v4
- name: TFLint (core rules only)
run: |
# TFLint >= 0.47 removed positional directory args; use --chdir
tflint --chdir terraform-example --init || true
tflint --chdir terraform-example -c .tflint.hcl