Skip to content

Commit 9b5046c

Browse files
Create ci-terraform.yml
Added Terraform CI Pipeline
1 parent 494e39c commit 9b5046c

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/ci-terraform.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 'CI Build Pipeline for Terraform AWS VPC Module'
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
jobs:
9+
terraform:
10+
name: 'Terraform'
11+
runs-on: ubuntu-latest
12+
# Use the Bash shell
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
steps:
18+
# Checkout the repository to the GitHub Actions runner
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
# Install the latest version of Terraform CLI
23+
- name: Setup Terraform
24+
uses: hashicorp/setup-terraform@v1
25+
26+
# Setup pre-commit hooks for terraform validation.
27+
- name: pre-commit
28+
uses: pre-commit/[email protected]
29+
with:
30+
# options to pass to pre-commit run
31+
extra_args: flake8 --all-files
32+
33+
# Checks that all Terraform configuration files adhere to a canonical format
34+
- name: Terraform Format
35+
run: terraform fmt -check

0 commit comments

Comments
 (0)