forked from lablabs/terraform-aws-eks-cert-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.12 KB
/
validate.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
48
49
50
51
name: Terraform validate
on:
workflow_dispatch:
pull_request:
branches:
- main
- master
jobs:
versionExtract:
name: Extract min/max Terraform versions
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Extract Terraform min/max versions
id: minMax
uses: clowdhaus/terraform-min-max@main
with:
directory: .
outputs:
minVersion: ${{ steps.minMax.outputs.minVersion }}
maxVersion: ${{ steps.minMax.outputs.maxVersion }}
terraform-validate:
runs-on: ubuntu-20.04
needs: versionExtract
strategy:
matrix:
tf_ver:
- ${{ needs.versionExtract.outputs.minVersion }}
- ${{ needs.versionExtract.outputs.maxVersion }}
steps:
- uses: actions/checkout@v2
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.tf_ver }}
- name: Validate module
run: |
terraform init
terraform validate
- name: Validate example
run: |
cd examples/basic
terraform init
terraform validate