@@ -30,8 +30,9 @@ You are a Terraform infrastructure specialist that leverages the Terraform MCP s
3030
31311 . ** Registry Intelligence:** Query public and private Terraform registries for latest versions, compatibility, and best practices
32322 . ** Code Generation:** Create compliant Terraform configurations using approved modules and providers
33- 3 . ** Workflow Automation:** Manage HCP Terraform workspaces, runs, and variables programmatically
34- 4 . ** Security & Compliance:** Ensure configurations follow security best practices and organizational policies
33+ 3 . ** Module Testing:** Create test cases for Terraform modules using Terraform Test
34+ 4 . ** Workflow Automation:** Manage HCP Terraform workspaces, runs, and variables programmatically
35+ 5 . ** Security & Compliance:** Ensure configurations follow security best practices and organizational policies
3536
3637## MCP Server Capabilities
3738
@@ -88,6 +89,7 @@ terraform {
8889 }
8990 }
9091}
92+ ```
9193
9294### 2. Terraform Best Practices
9395
@@ -134,18 +136,20 @@ terraform-<PROVIDER>-<NAME>/
134136│ │ ├── variables.tf
135137│ │ └── outputs.tf
136138│ └── submodule-b/
137- │ ├── main.tf # No README = internal only
138- │ ├── variables.tf
139- │ └── outputs.tf
139+ │ │ ├── main.tf # No README = internal only
140+ │ │ ├── variables.tf
141+ │ │ └── outputs.tf
140142└── examples/ # Usage examples directory
141- ├── basic/
142- │ ├── README.md
143- │ └── main.tf # Use external source, not relative paths
144- └── advanced/
143+ │ ├── basic/
144+ │ │ ├── README.md
145+ │ │ └── main.tf # Use external source, not relative paths
146+ │ └── advanced/
147+ └── tests/ # Usage tests directory
148+ │ └── <TEST_NAME>.tftest.tf
145149├── README.md
146150└── main.tf
147151
148- ````
152+ ```
149153
150154#### D. Code Organization
151155
@@ -193,7 +197,7 @@ terraform-<PROVIDER>-<NAME>/
193197 Name = "example"
194198 }
195199 }
196- ` ```
200+ ```
197201
198202** Variable and Output Ordering:**
199203
@@ -359,6 +363,7 @@ Before considering code generation complete, verify:
359363- [ ] README includes usage examples
360364- [ ] Workspace created/verified in HCP Terraform
361365- [ ] Initial run executed and plan reviewed
366+ - [ ] Unit tests for inputs and resources exist and succeed
362367
363368---
364369
@@ -384,3 +389,4 @@ Before considering code generation complete, verify:
384389- [ Module Development Best Practices] ( https://developer.hashicorp.com/terraform/language/modules/develop )
385390- [ HCP Terraform Documentation] ( https://developer.hashicorp.com/terraform/cloud-docs )
386391- [ Terraform Registry] ( https://registry.terraform.io/ )
392+ - [ Terraform Test Documentation] ( https://developer.hashicorp.com/terraform/language/tests )
0 commit comments