-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Terraform test workflow and Terraform validate steps
- Loading branch information
1 parent
49716b6
commit a830745
Showing
3 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Terraform tests | ||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- "**/*.tf" | ||
- ".github/workflows/terraform.yml" | ||
|
||
jobs: | ||
terraform_validate: | ||
name: Terraform validate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Terraform setup | ||
uses: hashicorp/setup-terraform@v3 | ||
with: | ||
terraform_version: 1.6.1 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Terraform format | ||
run: terraform fmt -check -recursive | ||
|
||
- name: Terraform init | ||
working-directory: ./examples/default | ||
run: terraform init -get -backend=false | ||
|
||
- name: Terraform validate | ||
working-directory: ./examples/default | ||
run: terraform validate |