Skip to main content

Task 02: Monitor Validate Stage

Objective: Monitor the validation stage to ensure configuration passes all checks Duration: ~2 minutes

DOCUMENT CATEGORY: Runbook SCOPE: Watch validation stage perform syntax and security checks PURPOSE: Watch validation stage perform syntax and security checks MASTER REFERENCE: Azure Pipelines Documentation

Status: Active

What Happens​

The validate stage performs:

  1. Terraform Format Check - Ensures consistent code formatting
  2. Terraform Validation - Syntax and variable validation
  3. Security Scan - Checks for security issues (tfsec/checkov)
  4. Linting - Code quality checks

Procedure​

1. Navigate to Pipeline​

In your CI/CD platform: Pipelines → Pipelines → Click the running pipeline

2. Watch Validate Stage​

Click the validate job to see real-time logs.

3. Review Output​

Look for:

  • ✅ terraform fmt -check passed
  • ✅ terraform validate passed
  • ✅ Security scan completed
  • ✅ No critical issues found

Common Issues​

Issue: Format check fails Solution: Run terraform fmt -recursive locally and recommit

Issue: Validation fails Solution: Check variable syntax, ensure all required variables defined

Issue: Security scan warnings Solution: Review findings, address critical/high severity issues


Validation​

  • Validate stage completed successfully (green checkmark)
  • No syntax errors
  • Security scan passed or warnings acknowledged


When to use: Use this tab if your CI/CD pipeline runs on GitHub Actions.

See procedure steps above for GitHub-specific guidance.

Toolkit Reference

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.

PreviousUpNext
Task 01 - Commit and PushPhase 02 - ExecutionTask 03 - Plan 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​

IssueCauseResolution
Validate stage failsConfiguration validation errorsReview pipeline logs for specific validation failures
Stage timeoutLong-running validation checksIncrease stage timeout or investigate slow operations

Version Control​

VersionDateAuthorChanges
1.0.02026-03-24Azure Local CloudInitial release