-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Updated all modules to new Zscaler RHEL9 Images (#18)
- Loading branch information
Showing
4 changed files
with
76 additions
and
201 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
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.