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
![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)
## Requirements

View File

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