Add CI to validate terraform

This commit is contained in:
Jake Howard 2020-02-21 18:51:06 +00:00
parent a3cc0f7849
commit 418c813ddb
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 22 additions and 0 deletions

17
.github/workflows/terraform.yml vendored Normal file
View file

@ -0,0 +1,17 @@
name: Terraform
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install terraform
- uses: marocchino/setup-terraform@v1
with:
version: "0.12.20"
- name: Initialize Terraform
run: terraform init
- name: Lint
run: ./scripts/terraform-lint.sh

View file

@ -1,6 +1,7 @@
# Infrastructure # Infrastructure
![Ansible Status](https://github.com/realorangeone/infrastructure/workflows/Ansible/badge.svg) ![Ansible Status](https://github.com/realorangeone/infrastructure/workflows/Ansible/badge.svg)
![Terraform Status](https://github.com/realorangeone/infrastructure/workflows/Terraform/badge.svg)
![Generic Linting](https://github.com/realorangeone/infrastructure/workflows/Lint/badge.svg) ![Generic Linting](https://github.com/realorangeone/infrastructure/workflows/Lint/badge.svg)
## Requirements ## Requirements

View file

@ -4,4 +4,8 @@ set -e
cd terraform/ cd terraform/
set -x
terraform validate
terraform fmt -check -recursive terraform fmt -check -recursive