-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (36 loc) · 949 Bytes
/
Copy pathterraform-ci.yml
File metadata and controls
47 lines (36 loc) · 949 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
39
40
41
42
43
44
45
46
47
name: Terraform CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
permissions:
contents: read
pull-requests: write
jobs:
terraform:
name: Terraform Validate & Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.7.0
- name: Terraform Format Check
run: terraform fmt -check -recursive
- name: Terraform Init
run: terraform init -backend=false
- name: Terraform Validate
run: terraform validate
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v4
- name: Run TFLint
run: tflint --recursive
- name: Run Checkov
uses: bridgecrewio/checkov-action@v12
with:
directory: .
quiet: true
soft_fail: true