-
Notifications
You must be signed in to change notification settings - Fork 24
47 lines (36 loc) · 1011 Bytes
/
terraform-validate.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
name: Terraform/OpenTofu Validate
on:
pull_request:
paths:
- 'tf-bootstrap/**'
- '.github/workflows/terraform-validate.yml'
jobs:
tofu-terraform-validate:
name: 'OpenTofu+Checkov'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tf-bootstrap
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup OpenTofu
uses: opentofu/setup-opentofu@v1
with:
tofu_version: '>1.6.0' # Specify your desired OpenTofu version
- name: OpenTofu Format
run: tofu fmt -check -recursive
- name: OpenTofu Init
run: tofu init
- name: OpenTofu Validate
run: tofu validate
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Test with Checkov
id: checkov
uses: bridgecrewio/checkov-action@master
with:
directory: ./tf-bootstrap
framework: terraform