Refactor Ansible actions to improve host inventory handling
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
name: Terraform AWS IAC Validate on Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "terraform/aws-iac/**"
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
jobs:
|
||||
terraform-validate:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/setup-env
|
||||
|
||||
- name: Setup Terraform environment
|
||||
uses: ./.github/actions/setup-terraform-env
|
||||
|
||||
- name: Terraform Init and Validate
|
||||
env:
|
||||
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
||||
run: |
|
||||
cd terraform/iac
|
||||
sectool exec terraform init
|
||||
sectool exec terraform validate
|
||||
sectool exec terraform fmt -check
|
||||
sectool exec terraform plan
|
||||
Reference in New Issue
Block a user