Skip to main content
Version: 1.0.0

Task 03: Review Plan Stage

Objective: Review Terraform plan to verify expected resource changes Duration: ~3 minutes

DOCUMENT CATEGORY: Runbook SCOPE: Review Terraform execution plan showing resource changes PURPOSE: Review Terraform execution plan showing resource changes MASTER REFERENCE: Terraform Plan Documentation

Status: Active

What Happens

The plan stage:

  1. Authenticates to Azure using CI/CD service principal
  2. Initializes Terraform backend (Azure Storage)
  3. Generates execution plan showing all resource changes
  4. Displays plan output in pipeline logs

Procedure

1. Click Plan Job

In CI/CD pipeline view, click the plan job.

2. Review Plan Output

Scroll through the Terraform plan looking for:

Terraform will perform the following actions:

# Resource groups
+ azurerm_resource_group.management

# Networking
+ azurerm_virtual_network.hub
+ azurerm_subnet.gateway
+ azurerm_subnet.azrl
+ azurerm_subnet.bastion
+ azurerm_subnet.endpoints
+ azurerm_subnet.dns

# VPN Gateway (longest deployment time)
+ azurerm_virtual_network_gateway.vpn

# Security
+ azurerm_key_vault.management

# Monitoring
+ azurerm_log_analytics_workspace.management

# Bastion
+ azurerm_bastion_host.management

Plan: 45 to add, 0 to change, 0 to destroy.

3. Verify Resource Counts

Check the summary line matches expectations:

  • Management mode: ~30-40 resources
  • Cluster mode: ~8-12 resources

4. Check for Unexpected Changes

Look for:

  • ❌ Resources being destroyed (should be 0 on initial deployment)
  • ❌ Unexpected resource modifications
  • ✅ Only additions expected

Key Resources to Verify

Resource TypeWhat to Check
VNetCorrect address space (e.g., 10.100.1.0/24)
SubnetsCorrect CIDRs, proper sizing
VPN GatewayCorrect SKU (VpnGw2AZ), BGP configuration
Key VaultCorrect name, access policies
Storage AccountCorrect name (lowercase, no hyphens)
Log AnalyticsCorrect retention settings

Validation

  • Plan stage completed successfully
  • Resource count matches expectations
  • No unexpected destroys or changes
  • VPN Gateway configuration correct
  • Network configuration matches planning
  • Key Vault and storage naming valid


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 scripted methods shown in the tabs above. Additional deployment methods including Azure CLI and Bash scripts are available in the azurelocal-toolkit repository under scripts/deploy/.

MethodDescription
Azure CLIPowerShell-based Azure CLI scripts for Azure resource operations
BashLinux/macOS compatible shell scripts for pipeline environments
PreviousUpNext
Task 02 - Validate StagePhase 02 - ExecutionTask 04 - Approve

Variables from variables.yml

VariableConfig PathExample
Plan Output Pathcicd.pipeline.plan_output./tfplan
State Backendcicd.pipeline.state_backendazurerm

Troubleshooting

IssueCauseResolution
Plan shows unexpected changesState file drift from manual changesReconcile state with actual infrastructure
Plan stage failsProvider authentication issuesVerify service principal credentials and permissions

Version Control

VersionDateAuthorChanges
1.0.02026-03-24Azure Local CloudInitial release