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, runaz 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(orwhat-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.bicepto my lab resource group ($env:AZURE_RESOURCE_GROUP) usingcurriculum/L1.1-core-deployment/main.bicepparam. Runaz bicep buildfirst, thenwhat-if, thencreate.
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.bicepto 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.bicepthat haspublicNetworkAccessset toDisabled, and tell me exactly how the container app still reaches each one.
Compare
curriculum/L1.1-core-deployment/main.bicepandcurriculum/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.bicepagainst 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.bicepallows inbound 80 from10.0.0.0/8. Narrow it to only the firewall subnet, explain why that is safe, runaz bicep build, then show me thewhat-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 serversql-<prefix>-<suffix>-drsetspublicNetworkAccess: '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 inwestus2with 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. Runaz bicep build, thenwhat-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:
- 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. - Say where to stop. βRun
what-if, do not deployβ is a different task from βdeployβ. Be explicit, especially when it costs money. - 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. - 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-ifbefore deploying. Agent mode is fast and confident, and confidently wrong occasionally β thewhat-ifstep 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 β