Lab: Build Complete GitOps Pipeline for VCF Automation
Objectives
- Create end-to-end GitOps: Git repo with cloud templates + Terraform, GitHub Actions CI/CD with validation + testing, HCP Terraform (Terraform Cloud) remote state and locking via the cloud block, auto-deploy to dev.
Prerequisites
VCF lab environment deployed and operational
Lab Environment
Standard VCF lab environment for Advanced VCF 9.0 Automation
Tasks
Task 1 Lab: Build Complete GitOps Pipeline for VCF Automation
Create end-to-end GitOps: Git repo with cloud templates + Terraform, GitHub Actions CI/CD with validation + testing, HCP Terraform (Terraform Cloud) remote state and locking via the cloud block, auto-deploy to dev.
Create a GitHub repo with directory structure: blueprints/<name>/blueprint.yaml (one folder per blueprint, each file named blueprint.yaml with name: and version: properties at the top, as VCF Automation Git integration requires; VCF 9.0.1 docs p.6006), terraform/, abx-actions/
Add GitHub Actions workflow: validate YAML, tflint, checkov, run unit tests
Set up an HCP Terraform (formerly Terraform Cloud) organization and workspace and connect it to the GitHub repo
Create Terraform modules with the matching providers (VCF 9.0.1 docs p.5904): organization with the Terraform Provider for VCF Automation; project with the Terraform Provider for Kubernetes (All Apps organizations) or the Terraform Provider for VMware Aria Automation (VM Apps organizations); blueprint with the Terraform Provider for VMware Aria Automation
Store the VCF API token as a sensitive variable in the HCP Terraform workspace
Add a cloud block to the root module pointing at the HCP Terraform organization and workspace from step 3 — HCP Terraform stores and locks the state, so the configuration must not also contain a backend block (terraform init rejects a cloud block combined with a backend block); run terraform init and confirm the state is in the workspace
Create feature branch, modify template, submit PR
Verify CI/CD runs validation, Terraform plan shows changes
Merge PR, auto-deploy to dev org via terraform apply
Validation Gate
Check: Verify lab completion
Expected: Lab exercise completed successfully
Common Errors
Final Validation
Lab completed successfully
✓ All steps completed → No errors observed
Cleanup / Restore
• Revert to snapshot if needed
Design Reflection (VCDX)
GitOps for infrastructure demonstrates modern operational practices. VCDX designs that include IaC pipelines score higher on manageability.