-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1004 Bytes
/
main.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
name: Terraform CI
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
lint:
strategy:
matrix:
path:
- architectures/apigw-nlb-ec2
- architectures/apigw-nlb-ecs
- architectures/apigw-public-ec2
- architectures/cloudmap-vpn-ecs
- architectures/vanilla-ec2
runs-on: ubuntu-latest
steps:
- name: Checkout the repository to the runner
uses: actions/checkout@v2
- name: Setup Terraform with specified version on the runner
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.3.0
- name: Terraform init
working-directory: ${{ matrix.path }}
id: init
run: terraform init
- name: Terraform format
working-directory: ${{ matrix.path }}
id: fmt
run: terraform fmt -check
- name: Terraform validate
working-directory: ${{ matrix.path }}
id: validate
run: terraform validate