Copilot Prompt Library

Copy-paste prompts that work against this repo, grouped by what you want to do. Dip in as needed β€” this is a reference page, not a tutorial.

Who this is for Time You need first
Anyone using Option 3 in a lab Dip in as needed Copilot Chat in agent mode, and ./scripts/Load-LabSettings.ps1 run once

[!IMPORTANT] These are written for agent mode, not ask mode. Press Ctrl+Alt+I, then switch the dropdown from Ask to Agent. Ask mode can only talk about your code; agent mode can read files, edit them, run az bicep build, and run the deploy. Every prompt below assumes it can act.

[!TIP] This repo ships a .github/copilot-instructions.md, which Copilot reads automatically. It already knows to use Azure Verified Modules, pin versions, keep the prefix under 12 characters and deploy at resource-group scope β€” so you don’t have to say any of that.

[!NOTE] Classroom accounts hold Azure Reader, so prompts that run az deployment group create (or what-if) locally will fail with authorization errors β€” verify deploys through the Actions workflow logs or the Azure portal instead, and deploy by running the lab workflow. Prompts that only edit or compile Bicep (az bicep build) work unchanged for everyone; the local deploy/diagnose prompts below work as written on self-hosted subscriptions.


Deploy as-is

Swap the path for whichever lab you are on.

Deploy curriculum/L1.1-core-deployment/main.bicep to my lab resource group ($env:AZURE_RESOURCE_GROUP) using curriculum/L1.1-core-deployment/main.bicepparam. Run az bicep build first, then what-if, then create.

What it should do: compile, show you the what-if diff, and wait. If it errors: paste the error back verbatim β€” that is the loop, and it is usually one round.


Modify, then deploy

The exercise built into each lab page:

Lab Prompt
L1.1 > Add a snet-data subnet 10.1.2.0/24 to the spoke VNet in curriculum/L1.1-core-deployment/main.bicep, run az bicep build to check it, then deploy.
L1.2 > Limit the firewall’s outbound rule in curriculum/L1.2-architecture-expansion/main.bicep to port 443 only β€” remove 80 β€” run az bicep build, then deploy.
L1.3 > In curriculum/L1.3-multi-service-application/main.bicep, raise maxReplicas to 5 and add an env var GREETING=Hello L1.3 to the container, run az bicep build, then deploy.
L1.4 > Switch the Front Door origin group in curriculum/L1.4-production-platform/main.bicep to weighted round-robin across both regions instead of priority failover, run az bicep build, then deploy.

Understand what is already there

Reading is where agent mode is most under-used.

Explain curriculum/L1.2-architecture-expansion/main.bicep to me as if I know Azure but not Bicep. Focus on how inbound traffic reaches a web VM, and why the load balancer is internal rather than public.

Trace every resource in curriculum/L1.3-multi-service-application/main.bicep that has publicNetworkAccess set to Disabled, and tell me exactly how the container app still reaches each one.

Compare curriculum/L1.1-core-deployment/main.bicep and curriculum/L1.3-multi-service-application/main.bicep. Which VNet does each one create, and which of them peer to what?


Diagnose a failure

This deployment failed with the error below. Read the relevant template in curriculum/, tell me the specific cause, and propose the smallest fix. Do not change anything yet.

<paste the full error, including the correlation ID>

Run az deployment group list -g $env:AZURE_RESOURCE_GROUP --query "[?properties.provisioningState=='Failed']", pick the most recent failure, and show me which operation inside it failed and why.


Harden it

Review curriculum/L1.2-architecture-expansion/main.bicep against the Azure Well-Architected Framework’s Security pillar. List what it does well and what it does not, ranked by risk. Do not change anything β€” just the review.

The NSG in curriculum/L1.2-architecture-expansion/main.bicep allows inbound 80 from 10.0.0.0/8. Narrow it to only the firewall subnet, explain why that is safe, run az bicep build, then show me the what-if.


Build what the labs deliberately left out

This is the most realistic exercise in the workshop, because you are fixing a design rather than following steps.

In curriculum/L1.4-production-platform/main.bicep, the DR server sql-<prefix>-<suffix>-dr sets publicNetworkAccess: 'Disabled' but has no private endpoint, and the secondary Container Apps environment has no VNet integration β€” so after a failover nothing can reach the promoted database. Add a VNet in westus2 with a private-endpoint subnet, a private DNS zone linked to it, and a private endpoint on the DR server. Use Azure Verified Modules and keep versions pinned. Run az bicep build, then what-if. Do not deploy.

See the Well-Architected scorecard on the L1.4 page for why this gap matters.


Writing your own prompts

Four things separate a prompt that works from one that wanders:

  1. Name the file. curriculum/L1.2-architecture-expansion/main.bicep, not β€œthe firewall template”. Agent mode will find it either way, but naming it stops the guessing.
  2. Say where to stop. β€œRun what-if, do not deploy” is a different task from β€œdeploy”. Be explicit, especially when it costs money.
  3. Ask for the check. Adding β€œrun az bicep build” makes Copilot verify its own work before handing it back, and it fixes most of its own mistakes that way.
  4. Paste errors whole. Truncating an Azure error usually removes the part that identifies the cause.

[!WARNING] You are the reviewer. Read every diff before accepting it, and read every what-if before deploying. Agent mode is fast and confident, and confidently wrong occasionally β€” the what-if step exists precisely so a bad edit costs you nothing.



GitHub feature spotlight Β· Repository instructions for Copilot

You just used it: none of the prompts above mention Azure Verified Modules, version pinning, the 12-character prefix limit or resource-group scope β€” because Copilot already knows. The repo tells it. Find it: .github/copilot-instructions.md. Copilot reads it automatically on every request in this repo; you never attach it. Beyond the lab: house conventions live with the code instead of in someone’s head, so every contributor β€” human or AI β€” starts from the same rules. It is a plain markdown file, and reviewing changes to it is a normal pull request. Docs β†’