-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (45 loc) · 1.6 KB
/
check-terraform-project.yml
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
name: Check Terraform project
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
terraform-checks:
name: Run terraform project checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-terraform@v2
- name: Check project tf base digitalocean-k8s
run: |
cd \{\{cookiecutter.project_dirname\}\}/terraform/base/digitalocean-k8s
terraform init -backend=false -lock=false -reconfigure
terraform fmt -check
terraform validate
- name: Check project tf cluster digitalocean-k8s
run: |
cd \{\{cookiecutter.project_dirname\}\}/terraform/cluster/digitalocean-k8s
terraform init -backend=false -lock=false -reconfigure
terraform fmt -check
terraform validate
- name: Check project tf cluster other-k8s
run: |
cd \{\{cookiecutter.project_dirname\}\}/terraform/cluster/digitalocean-k8s
terraform init -backend=false -lock=false -reconfigure
terraform fmt -check
terraform validate
- name: Check project tf environment digitalocean-k8s
run: |
cd \{\{cookiecutter.project_dirname\}\}/terraform/environment/digitalocean-k8s
terraform init -backend=false -lock=false -reconfigure
terraform fmt -check
terraform validate
- name: Check project environment other-k8s
run: |
cd \{\{cookiecutter.project_dirname\}\}/terraform/environment/other-k8s
terraform init -backend=false -lock=false -reconfigure
terraform fmt -check
terraform validate