Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Commit fc516b0

Browse files
authored
Add a new aztf-agent chatmode to have only specific tools enabled. Also updated docs to explain how this works.
1 parent 053668c commit fc516b0

File tree

9 files changed

+44
-16
lines changed

9 files changed

+44
-16
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
description: AI-powered agent for implementing Azure Terraform modules.
3+
tools: ['changes', 'codebase', 'editFiles', 'extensions', 'fetch', 'findTestFiles', 'githubRepo', 'new', 'openSimpleBrowser', 'problems', 'runCommands', 'runTasks', 'runTests', 'search', 'searchResults', 'terminalLastCommand', 'terminalSelection', 'testFailure', 'usages', 'vscodeAPI', 'Terraform MCP Server', 'azmcp-bestpractices-get', 'pylance mcp server', 'azure-mcp-server-ext']
4+
---

.github/copilot-instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ Check the files in `/.github/instructions/*.instructions.md` for any additional
1616

1717

1818
### File and Folder Structure
19-
- When you are creating new files or folders, follow the standards in #file:/docs/file-structure.md
20-
- If you need a reference for what each file or folder does, refer to #file:/docs/file-structure.md
21-
- When you create a new file in the `/` root folder or the `docs/` folder, update #file:/docs/file-structure.md with a brief decription of the file's purpose and any relevant details.
22-
- When you create a new folder, update #file:/docs/file-structure.md with a brief description of the folder's purpose and any relevant details.
19+
- When you are creating new files or folders, follow the standards in #file:/docs/file_structure.md
20+
- If you need a reference for what each file or folder does, refer to #file:/docs/file_structure.md
21+
- When you create a new file in the `/` root folder or the `docs/` folder, update #file:/docs/file_structure.md with a brief decription of the file's purpose and any relevant details.
22+
- When you create a new folder, update #file:/docs/file_structure.md with a brief description of the folder's purpose and any relevant details.
2323

2424
### **ALWAYS** Document Changes
2525
**ALL CODE CHANGES** must be documented in #file:/CHANGES_SUMMARY.md including:

.github/prompts/1-plan.prompt.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
mode: 'agent'
32
description: 'Plan an implementation'
43
---
54

@@ -19,7 +18,7 @@ Your goal is to generate an implementation plan, in a new markdown .md file, for
1918

2019
### 2. THEN
2120
- Create a detailed implementation plan that outlines the steps needed to achieve the objectives of the specification document.
22-
- Think about the file types that will be created, and review the file `/docs/file-structure.md` as well as instructions for the relevant file in the `/.github/instructions/` folder. For example, follow the instructions in `/.github/instructions/tf.instructions.md` for `*.tf` files.
21+
- Think about the file types that will be created, and review the file `/docs/file_structure.md` as well as instructions for the relevant file in the `/.github/instructions/` folder. For example, follow the instructions in `/.github/instructions/tf.instructions.md` for `*.tf` files.
2322
- The plan should be structured, clear, and easy to follow.
2423
- Always add validation steps in your plan to ensure the implementation meets the requirements.
2524
- Structure your plan as follows, and output as Markdown code block

.github/prompts/2-implement.prompt.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
mode: 'agent'
32
description: 'Implement a plan step by step'
43
---
54
Your task is to implement each step of the provided plan, one at a time.
@@ -10,7 +9,7 @@ Your task is to implement each step of the provided plan, one at a time.
109
Before implementation, check the corresponding instructions in the `~/.github/instructions` folder.
1110
For example, follow the instructions in `~/.github/instructions/tf.instructions.md` for `*.tf` files.
1211

13-
Refer to [file-structure.md](../../docs/file-structure.md) and check other implementations in the workspace to see how they are done. **DO NOT** make changes to the other files that you are only using for reference.
12+
Refer to [file_structure.md](../../docs/file_structure.md) and check other implementations in the workspace to see how they are done. **DO NOT** make changes to the other files that you are only using for reference.
1413

1514
Validate and self-review your implementation to ensure that it meets the requirements.
1615

.github/prompts/3-apply.prompt.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
mode: 'agent'
32
description: 'Test the Terraform module implementation by running `terraform plan` and `terraform apply`'
43
---
54
Your task is to run `terraform plan` and then `terraform apply` on the `configuration.tfvars` of the terraform module provided to you. And then fix any issues that arise during the process. You will be working with the Terraform module located in `~/modules/<module_name>`.

CHANGES_SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This document summarizes the updates made to the Azure DevCenter module to imple
6262
- **Breaking Change**: No
6363

6464
### Documentation Updates
65-
- **Updated**: `docs/file-structure.md` to include environment type implementation plan
65+
- **Updated**: `docs/file_structure.md` to include environment type implementation plan
6666
- **Fixed**: Markdown formatting and trailing newline issues
6767
- **Type**: Documentation improvement
6868
- **Breaking Change**: No
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ This section contains specific files/callouts. If the file is not explained here
5757

5858
- **conventions.md**: Comprehensive coding standards and conventions for Terraform development, including file organization, naming conventions, variable structure patterns, and best practices for consistent code across all modules.
5959
- **getting_started.md**: Complete setup guide including prerequisites (Terraform, Azure CLI), authentication setup, GitHub Codespaces configuration with MCP (Model Context Protocol) server support, and step-by-step deployment instructions with both VS Code tasks and command-line options.
60-
- **file-structure.md**: (This file) Documentation of the files and folder structure standards and overview of this workspace.
60+
- **file_structure.md**: (This file) Documentation of the files and folder structure standards and overview of this workspace.
6161
- **module_guide.md**: Detailed reference for each Terraform module including purpose, usage examples, input variables, configuration options, and inter-module relationships for Resource Groups, Dev Centers, Projects, Environment Types, Network Connections, Galleries, and Catalogs.
6262
- **testing.md**: Comprehensive testing guide covering Terraform's native testing functionality with provider mocking, test structure (unit vs integration), running tests via VS Code tasks or command line, writing new tests following established patterns, troubleshooting common issues, and validation procedures.
6363

docs/getting_started.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,38 @@ az account show --query "[name,id]" -o tsv
110110

111111
Note: We use environment variables for the subscription ID instead of including it in configuration files. This approach is more secure and follows infrastructure-as-code best practices. The VS Code tasks in this project will automatically handle exporting the subscription ID for you.
112112

113-
### 3. Choose How to Run Terraform Commands
113+
### 3. AI-Assisted Module Development with Copilot Prompts (Recommended)
114+
115+
The project includes specialized copilot prompts for AI-assisted development of Terraform modules. This approach enables "vibe coding" - intuitive module implementation through 3 easy steps:
116+
117+
**Prerequisites:**
118+
- Ensure the Azure and Terraform MCP servers are running
119+
- Best used with the `aztf-agent` chat mode for optimal results
120+
121+
**The 3-Step Workflow:**
122+
123+
1. **`/1-plan`** - Plan your Terraform module implementation
124+
- Reusable prompt located at: `/.github/prompts/1-plan.prompt.md`
125+
- Analyzes requirements and designs module structure
126+
127+
2. **`/2-implement`** - Implement the Terraform module code
128+
- Reusable prompt located at: `/.github/prompts/2-implement.prompt.md`
129+
- Generates module files, variables, outputs, and documentation
130+
131+
3. **`/3-apply`** - Apply and test the module implementation
132+
- Reusable prompt located at: `/.github/prompts/3-apply.prompt.md`
133+
- Creates examples and validates the module functionality
134+
135+
This AI-assisted approach leverages the MCP integrations to provide intelligent guidance throughout the module development process, making it easier to create well-structured, documented Terraform modules for Azure resources.
136+
137+
### 4. Choose How to Run Terraform Commands
138+
139+
> [!NOTE]
140+
> This is only necessary if you skipped `/3-apply` above.
114141
115142
You have two options for running Terraform commands:
116143

117-
#### Option 1: Using VS Code Tasks (Recommended)
144+
#### Option 1: Using VS Code Tasks
118145

119146
The project includes predefined VS Code tasks for easy execution:
120147

@@ -151,15 +178,15 @@ Each example includes:
151178
- Resource-specific configurations
152179
- Parent-child resource relationships where needed
153180

154-
### 4. Apply the Configuration
181+
### 5. Apply the Configuration
155182

156183
After reviewing the plan, apply it:
157184

158185
```bash
159186
terraform apply -var-file=examples/resource_group/simple_case/configuration.tfvars
160187
```
161188

162-
### 5. Clean Up Resources
189+
### 6. Clean Up Resources
163190

164191
When you're done, you can remove all created resources using either VS Code tasks or the command line:
165192

docs/plans/dev_center_environment_type.plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ This plan outlines the implementation of the `dev_center_environment_type` modul
110110
- [x] **Step 7: Update Documentation**
111111
- **Task**: Update project documentation to include environment type module information
112112
- **Files**:
113-
- `docs/file-structure.md`: Already updated with environment type module and example locations
113+
- `docs/file_structure.md`: Already updated with environment type module and example locations
114114
- `docs/module_guide.md`: Already updated with comprehensive environment type usage patterns and configuration options
115115
- **Dependencies**: Existing documentation standards
116116
- **Pseudocode**: Add environment type section with usage examples and configuration reference

0 commit comments

Comments
 (0)