-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (45 loc) · 1.17 KB
/
lint-terraform.yaml
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
#
# Nimbus
# Terraform
# Lint Terraform Pipeline
#
name: "Lint & Plan Terraform"
on: push
jobs:
lint-terraform:
name: "Lint Terraform deployment"
runs-on: ubuntu-20.04
defaults:
run:
working-directory: terraform
steps:
- uses: actions/checkout@v3
- name: "Setup Terraform CLI"
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.9.6
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: "Terraform Fmt Check"
run: terraform fmt -check
- name: "Terraform Init"
run: terraform init
- name: "Terraform Validate"
run: terraform validate -no-color
plan-terraform:
name: "Plan Terraform deployment"
runs-on: ubuntu-20.04
defaults:
run:
working-directory: terraform
steps:
- uses: actions/checkout@v3
- name: "Setup Terraform CLI"
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.9.6
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: "Terraform Init"
run: terraform init
- name: "Terraform Plan"
run:
terraform plan