Skip to content

Commit

Permalink
feat: Updated all modules to new Zscaler RHEL9 Images
Browse files Browse the repository at this point in the history
  • Loading branch information
willguibr committed Aug 20, 2024
1 parent 7e266df commit 3ad1fb7
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 201 deletions.
127 changes: 76 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,89 @@

---
name: CI/CD
on:
push:
branches:
- main
- develop
pull_request:
name: Terraform checks
on: [push, pull_request]

jobs:
pre-commit:
name: Verify the pre-commit framework was used properly by developers
terraform-linter:
runs-on: ubuntu-latest

steps:
- name: Check out source
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
# Semantic version range syntax (like 3.x) or the exact Python version
python-version: '3.11.0'
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3

- name: Run pre-commit framework as the developer should run it
run: sudo ./scripts/install.sh && sudo ./scripts/run.sh
- name: Terraform Format
id: fmt
run: terraform fmt -check -recursive

- name: The `git diff` showing whether the pre-commit mandated extra changes to the repository files
if: failure()
run: git diff
- name: Terraform Init
id: init-zpa-service-edge-group
run: |
cd modules/terraform-zpa-service-edge-group
terraform init
validate:
name: Validate
runs-on: ubuntu-latest
- name: Terraform Validate
id: validate-zpa-service-edge-group
run: |
cd modules/terraform-zpa-service-edge-group
terraform validate -no-color
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Terraform Init
id: init-zpa-provisioning-key
run: |
cd modules/terraform-zpa-provisioning-key
terraform init
- name: Set up Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 0.15.3
- name: Terraform Validate
id: validate-zpa-provisioning-key
run: |
cd modules/terraform-zpa-provisioning-key
terraform validate -no-color
- name: Terraform Init
id: init-zpse-vm-azure
run: |
cd modules/terraform-zpse-vm-azure
terraform init
- name: Terraform Validate
id: validate-zpse-vm-azure
run: |
cd modules/terraform-zpse-vm-azure
terraform validate -no-color
- name: Terraform Init
id: init-zpse-bastion-azure
run: |
cd modules/terraform-zpse-bastion-azure
terraform init
- name: Terraform Validate
id: validate-zpse-bastion-azure
run: |
cd modules/terraform-zpse-bastion-azure
terraform validate -no-color
- name: Terraform Init
id: init-zpse-network-azure
run: |
cd modules/terraform-zpse-network-azure
terraform init
- name: Terraform Validate
id: validate-zpse-network-azure
run: |
cd modules/terraform-zpse-network-azure
terraform validate -no-color
- name: Terraform Init
id: init-zpse-nsg-azure
run: |
cd modules/terraform-zpse-nsg-azure
terraform init
- name: terraform validate
env:
AWS_DEFAULT_REGION: us-west-2
- name: Terraform Validate
id: validate-zpse-nsg-azure
run: |
cd "$GITHUB_WORKSPACE"
for dir in $(find modules examples -type d -not \( -name ".?*" \) -maxdepth 1 -mindepth 1);
do
if [[ "$dir" == "modules/transit_gateway_peering" ]];
then
echo "Skipping directory: $dir"
echo "Terraform does not support validating a module which uses an aliased provider (module-specific; validating an entire configuration works fine)."
continue
fi
echo "Processing directory: $dir"
cd "$GITHUB_WORKSPACE/$dir"
terraform init -backend=false
terraform validate
done
cd modules/terraform-zpse-nsg-azure
terraform validate -no-color
55 changes: 0 additions & 55 deletions scripts/install.sh

This file was deleted.

83 changes: 0 additions & 83 deletions scripts/requirements.txt

This file was deleted.

12 changes: 0 additions & 12 deletions scripts/run.sh

This file was deleted.

0 comments on commit 3ad1fb7

Please sign in to comment.