-
Notifications
You must be signed in to change notification settings - Fork 13
39 lines (37 loc) · 1000 Bytes
/
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
name: 'terraform'
# This workflow verifies that the Terraform configs are valid,
# without running Google Anthos or building any Packet infrastructure.
# https://learn.hashicorp.com/tutorials/terraform/automate-terraform
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
env:
TF_IN_AUTOMATION: 1
TF_VERSION: ${{ matrix.tf }}
strategy:
matrix:
os: [ubuntu-latest]
tf: [1]
steps:
- name: Checkout from Github
uses: actions/checkout@v4
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ env.TF_VERSION }}
- name: Check Terraform formatting
id: fmt
run: terraform fmt
continue-on-error: true
- name: Initialize Terraform, Modules, and Plugins
id: init
run: terraform init -input=false
- name: Validate Terraform syntax
id: validate
run: terraform validate -no-color