Sharpening workflow for Terraform on Azure using Awesome-Copilot
New chat modes and instructions to help you plan and implement your next project.
This post shares my experience with GitHub Copilot chat modes and instructions, which led to a contribution to the Awesome Copilot community repository.
If you use agent mode in VS Code, you might want a more shareable way to manage agent personas, tools, and approaches. This helps you switch easily as your project moves from planning to development and maintenance.
Getting started is easy. This post shows you how.
Chat Modes and Instructions
What Are Chat Modes and Prompts?
Chat modes are markdown files that define Copilot’s persona, tools (MCP servers), and expected output.
For example, instead of re-prompting Copilot with “pretend you are an IaC expert coder reviewing for the Azure platform,” use a predefined mode for more consistent and efficient results.
Here are some example chat modes:
Mode | Description |
---|---|
Mentor | Acts as a mentor, asking questions to confirm understanding |
Janitor | Focuses on code reduction and hygiene (inspired by @PlagueHO’s janitor mode) |
Architect | Provides architectural guidance |
Planner | Helps with planning and design |
Implementor | Assists with implementation |
Reviewer | Conducts code reviews |
You can find examples like these in GitHub’s Awesome Copilot community repository.
To install them, click the “VS Code: Install” link, or copy the markdown files to your .github/chatmodes
folder.
This post introduces two new modes I wrote that were recently accepted:

As you see above, they appear below the default chat modes of Ask, Edit & Agent.
Too many tools
One challenge is there are many MCP servers available, but only a selection can be activated at once. VS Code will stop you if you try to load too many to avoid making the context window too large. You want to target tools appropriate for the task.
Chat modes let you specify the right tools for each task without manual switching. Add the tools to the markdown header:
|
|
Switching tools becomes as easy as switching chat modes.
Chat modes must end in .chatmode.md
. By convention, they go in .github/chatmodes
.
Instructions
Only one chat mode can be active at a time, but you can switch modes as your conversation continues (e.g., from planning to implementation).
In contrast, you can have multiple instructions active at once, covering different aspects of required behavior.
Let’s clarify with examples
- A general “don’t re-write everything” instruction (part of the “taming-copilot” instruction in the awesome copilot examples).
- An instruction aimed at module development using Azure Verified Modules in Terraform.
- A instruction aimed at authoring Terraform solutions, leveraging AVM.
These are usually constrained by file type - and it is fine for these to overlap, for example the Terraform examples above look like this:
|
|
|
|
My colleague Jordan Williams described these as the “values” you want your agent to adhere to. The sum of these values is applied to the chat mode persona.
Instructions, like chat modes, are markdown files ending in .instructions.md
. By convention, they go in .github/instructions
.
Terraform on Azure: Plan and Implement Phases
Inspired by existing Bicep chat modes I created chat modes that split IaC development into planning and implementation phases.
A new terraform-azure-implement.instructions.md
took inspiration from Jared Holgate’s Yorkshire Azure User Group talk on Terraform best practices.
This approach, combined with Microsoft’s Azure Verified Modules (AVM), yields my desired outcome - a chat mode that produces code requiring less remediation. While getting to zero is a tall order, this is about preventing recurring problems and getting closer to a good first attempt faster.
Why Split into Plan and Implement?
Traditional workflows often blur planning and coding, especially in agile development. When working with LLMs, their verbosity can be a useful grounding tool that pays dividends when delegating implementation tasks.
For example, if you ask an agent to create Terraform for a solution without context, how does it know if it’s for a demo, a small customer, or a mission-critical enterprise solution?
This could be considered a lightweight version of specification-driven development, as epitomized by frameworks like Speckit, recently released by GitHub.
Getting Started with Terraform-Azure Chat Modes
Getting started is easy. Either copy markdown files of interest from the awesome-copilot repository, or use the links below:
Try these modes on your next Azure project to help generate Azure-aligned IaC with less effort. I’d love to hear how it goes!
For more inspiration, you can also review the Azure Cloud Development collection, which has more suggestions for chat modes, instructions and prompts to help tame your agents.