Exercise 14 ยท 60 minutes

Review infrastructure through GitHub

Prepare a focused Terraform change, communicate its plan and operational impact in a pull request, respond to review, and deploy the approved result manually.

ModuleCollaborate in GitAzure costNone expectedRequiresPeer reviewer

Before you start

Goal and prerequisites

Your goal

Make a pull request independently reviewable before any Azure mutation, then deploy from the merged and revalidated configuration.

You need

  • The module from Exercise 12
  • Exercise 13 completed
  • Permission to push a branch and open a pull request
  • A peer or instructor reviewer
  • A clean no-change plan on main

Participant task

Make the change reviewable

  1. 01

    Create a focused change

    Create lab/review-change. Add one approved tag through the module interface and one validation rule that protects the naming convention.

    git switch -c lab/review-change
  2. 02

    Generate review evidence

    Format, validate, and save a plan. Summarize the actions and affected resource addresses. Do not commit the binary plan or raw state.

    terraform fmt -check -recursive
    terraform validate
    terraform plan -out main.tfplan
    terraform show -no-color main.tfplan
  3. 03

    Open the pull request

    Describe intent, plan summary, security impact, expected cost, rollback, verification, and cleanup. Link the requirement and request a reviewer.

  4. 04

    Review a peer

    Check resource addresses, replacements, unknown values, permissions, tags, state implications, and whether the proposed verification proves the requirement. Leave one question or actionable observation.

  5. 05

    Merge, re-plan, and deploy

    After approval, merge the pull request, update local main, and create a fresh saved plan. Confirm it matches the reviewed intent before applying and verifying Azure.

    git switch main
    git pull
    terraform plan -out main.tfplan
    terraform apply main.tfplan

Expected outcome

Prove review changed the result

Validation

  • The pull request explains intent and plan impact.
  • A reviewer assesses infrastructure behavior, not only syntax.
  • No deployment occurs on push or merge.
  • The merged configuration is re-planned before apply.

Optional extension

Write a repository pull-request template that prompts for plan summary, cost, security, verification, and cleanup without embedding sensitive plan output.

Finish

Retain the reviewed sandbox

Delete local plan files and confirm the merged branch is clean. Keep the resources for the final operations exercise.