Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Github Action Integration #16

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Terraform Validation

on: [ push ]

jobs:
test:
name: Verify Terraform is valid for ${{ matrix.terraform_dir }}
runs-on: ubuntu-18.04
timeout-minutes: 5
container:
image: hashicorp/terraform:0.12.19
env:
AWS_DEFAULT_REGION: us-east-1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set AWS_DEFAULT_REGION as per hashicorp/terraform#21408 (comment) to not fail on implicit provider defaults.

strategy:
matrix:
terraform_dir: [main, lambda]

steps:
- uses: actions/checkout@v1
- name: "Terraform Init"
run: terraform init
working-directory: ${{ matrix.terraform_dir }}
- name: "Validate Terraform"
run: terraform validate
working-directory: ${{ matrix.terraform_dir }}