39 lines
790 B
YAML
39 lines
790 B
YAML
name: Validate Terraform
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- feature/**
|
|
paths:
|
|
- "k8sapps/**"
|
|
|
|
jobs:
|
|
plan:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Terraform
|
|
uses: hashicorp/setup-terraform@v1
|
|
with:
|
|
terraform_version: 1.9.6
|
|
|
|
- name: Setup Sectool
|
|
uses: a13labs/setup-sectool@v1
|
|
|
|
- name: Terraform Init
|
|
env:
|
|
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
|
run: |
|
|
cd k8sapps
|
|
sectool exec terraform init
|
|
|
|
- name: Terraform Plan
|
|
env:
|
|
VAULT_MASTER_PASSWORD: ${{ secrets.VAULT_MASTER_PASSWORD }}
|
|
run: |
|
|
cd k8sapps
|
|
sectool exec terraform plan
|