-
Couldn't load subscription status.
- Fork 1.2k
Terraform on Azure chat mode & instructions #262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive Terraform on Azure infrastructure as code guidance, focusing on Azure Verified Modules (AVM) adoption and Well-Architected Framework alignment. It introduces planning and implementation chat modes alongside best practices instructions.
- Adds Azure-specific Terraform instructions emphasizing AVM usage and WAF principles
- Introduces a planning chat mode for creating implementation specifications
- Includes an implementation chat mode for code generation and reviews
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| instructions/terraform-azure.instructions.md | New comprehensive Azure Terraform best practices with AVM integration |
| chatmodes/terraform-azure-planning.chatmode.md | Planning mode for creating infrastructure implementation specifications |
| chatmodes/terraform-azure-implement.chatmode.md | Implementation mode for generating and reviewing Terraform code |
| collections/azure-cloud-development.md | Updated to include new Terraform Azure items |
| collections/azure-cloud-development.collection.yml | Added new chat modes and instruction references |
| README.instructions.md | Added entry for new Azure Terraform instructions |
| README.collections.md | Updated item count from 15 to 18 |
| README.chatmodes.md | Added entries for both new chat modes |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Pull Request Checklist
node update-readme.jsand verified thatREADME.mdis up to date.Description
It is noted there are some existing Terraform instructions, including a recent 'modern' example from @PlagueHO (hello :))
So, what's different about this one:
This is specifically aimed at writing Terraform following Microsoft's AVM guidance, from the perspective of creating solutions (vs the existing AVM chat modes that seemed aimed at module development)
I have leaned heavily into the existing Bicep plan and implement chat modes. I don't believe we have a good "planning" mode for Terraform at the moment.
I've provided strong encouragement to use AVM, and cross referenced the specification and practices for those aspects that are relevant to solutions. Partly based on my time working with that team, partly experience learnt and shared - for example - I've incorporated Jared Holgate's recent presentation on Terraform recommended practices (https://www.youtube.com/watch?v=4eMBYfi4uts)
I've cross referenced existing complementary prompts like taming copilot and devops principals, whilst summarising them inline in case they are not available (is this reasonable?).
I would humbly submit that the result is closer to what I think Terraform on Azure should target.
I've tested this on code which is not WAF aligned, not aligned to AVM, and "behind current" with AVM versions, and attempting to design architecturally suspect solutions (e.g. I tried getting it to use a function app for a service that required hosting).
In terms of approach, besides asking AI for normal review feedback, I've been through a few demo builds and reviews and used AI to review my fixing feedback to get it folded into the instruction.
I've tried this on Claude, GPT-5 and Grok (preview) models.
I'm still experimenting and learning what makes good prompts, so would very much appreciate candid feedback (besides what I've already had from an AI review☺️ )
Type of Contribution
Additional Notes
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.