Task 01: Commit and Push Configuration
Objective: Commit configuration changes and push to the repository to trigger CI/CD pipeline
DOCUMENT CATEGORY: Runbook SCOPE: Commit Terraform configuration to Git and trigger pipeline PURPOSE: Commit Terraform configuration to Git and trigger pipeline MASTER REFERENCE: Azure Pipelines Documentation
Status: Active
Procedure
1. Review Changes
cd /path/to/project
git status
git diff terraform.tfvars
2. Stage Changes
git add terraform.tfvars
git add terraform/ # If using separate terraform directory
3. Commit with Descriptive Message
git commit -m "Deploy Phase 04 management infrastructure
- Configure management mode with VNet 10.100.1.0/24
- Configure cluster c01 at RAL location
- Deploy VPN Gateway VpnGw2AZ with BGP
- Enable Azure Bastion and Key Vault
"
4. Push to Repository
git push origin main
Pipeline will automatically trigger on push.
Validation
- Git commit successful
- Changes pushed to repository
- Pipeline automatically started in CI/CD pipeline → Pipelines
- GitHub
- GitLab
- Azure DevOps
When to use: Use this tab if your CI/CD pipeline runs on GitHub Actions.
See procedure steps above for GitHub-specific guidance.
When to use: Use this tab if your CI/CD pipeline runs on GitLab CI/CD.
See procedure steps for GitLab-specific guidance.
When to use: Use this tab if your CI/CD pipeline runs on Azure DevOps Pipelines.
See procedure steps for Azure DevOps-specific guidance.
Scripts for this task are located in the azurelocal-toolkit repository under scripts/deploy/ in the appropriate task folder.
Alternatives
The procedures in this task use the methods shown in the tabs above. The toolkit is PowerShell 7 only and has no Bash scripts. A few tasks that act on Azure also have an Azure CLI script written in PowerShell. The script status page of the toolkit lists which task has which script.
Navigation
| Previous | Up | Next |
|---|---|---|
| Phase 01 - Configuration | Phase 02 - Execution | Task 02 - Validate Stage |
Values from infrastructure.yml
The pipeline settings are in the devops section of infrastructure.yml (schema 5): the platform, the project, the repository, the approval environments, the runners and the Terraform state. The Terraform code does not define these values a second time. config/variables/scripts/New-IacVariableFiles.ps1 writes terraform.tfvars.json and backend.hcl from the file. See the variables reference.
Troubleshooting
| Issue | Cause | Resolution |
|---|---|---|
| Push rejected by remote | Branch protection rules blocking push | Create a pull request instead of direct push |
| Commit fails pre-commit hooks | Configuration files failing validation | Fix validation errors reported by pre-commit hooks |
Version Control
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0.0 | 2026-03-24 | Azure Local Cloud | Initial release |