forked from indigo423/opennms-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (95 loc) · 3.11 KB
/
Copy pathterraform-lint.yml
File metadata and controls
119 lines (95 loc) · 3.11 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Terraform Lint
on:
pull_request:
paths:
- 'terraform/**'
jobs:
fmt:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "~1.5"
- name: terraform fmt
run: terraform fmt -check -recursive terraform/
validate-azure:
name: Validate (Azure)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "~1.5"
- name: terraform init
run: terraform init -backend=false
working-directory: terraform/azure
- name: terraform validate
run: terraform validate
working-directory: terraform/azure
validate-kvm:
name: Validate (KVM)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "~1.5"
- name: terraform init
# -upgrade forces provider download; libvirt provider is a community
# provider from dmacvicar/libvirt and installs without a running host
run: terraform init -backend=false -upgrade
working-directory: terraform/kvm
- name: terraform validate
# validate checks syntax and type correctness only — no provider API calls
run: terraform validate
working-directory: terraform/kvm
validate-proxmox:
name: Validate (Proxmox)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "~1.5"
- name: terraform init
# bpg/proxmox is a community provider and installs without a running host
run: terraform init -backend=false
working-directory: terraform/proxmox
- name: terraform validate
# validate checks syntax and type correctness only — no provider API calls
run: terraform validate
working-directory: terraform/proxmox
tflint:
name: TFLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: terraform-linters/setup-tflint@v4
with:
tflint_version: latest
- name: Init TFLint (Azure)
run: tflint --init
working-directory: terraform/azure
env:
GITHUB_TOKEN: ${{ github.token }}
- name: TFLint (Azure)
run: tflint --recursive --minimum-failure-severity=error
working-directory: terraform/azure
- name: Init TFLint (KVM)
run: tflint --init
working-directory: terraform/kvm
env:
GITHUB_TOKEN: ${{ github.token }}
- name: TFLint (KVM)
run: tflint --recursive --minimum-failure-severity=error
working-directory: terraform/kvm
- name: Init TFLint (Proxmox)
run: tflint --init
working-directory: terraform/proxmox
env:
GITHUB_TOKEN: ${{ github.token }}
- name: TFLint (Proxmox)
run: tflint --recursive --minimum-failure-severity=error
working-directory: terraform/proxmox