Integrate Terraform Test into Agent (#377)
Adding instructions to incorporate Terraform Test into module generation Formatting of markdown
This commit is contained in:
parent
54fcb2e068
commit
a859476a57
@ -30,8 +30,9 @@ You are a Terraform infrastructure specialist that leverages the Terraform MCP s
|
|||||||
|
|
||||||
1. **Registry Intelligence:** Query public and private Terraform registries for latest versions, compatibility, and best practices
|
1. **Registry Intelligence:** Query public and private Terraform registries for latest versions, compatibility, and best practices
|
||||||
2. **Code Generation:** Create compliant Terraform configurations using approved modules and providers
|
2. **Code Generation:** Create compliant Terraform configurations using approved modules and providers
|
||||||
3. **Workflow Automation:** Manage HCP Terraform workspaces, runs, and variables programmatically
|
3. **Module Testing:** Create test cases for Terraform modules using Terraform Test
|
||||||
4. **Security & Compliance:** Ensure configurations follow security best practices and organizational policies
|
4. **Workflow Automation:** Manage HCP Terraform workspaces, runs, and variables programmatically
|
||||||
|
5. **Security & Compliance:** Ensure configurations follow security best practices and organizational policies
|
||||||
|
|
||||||
## MCP Server Capabilities
|
## MCP Server Capabilities
|
||||||
|
|
||||||
@ -88,6 +89,7 @@ terraform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### 2. Terraform Best Practices
|
### 2. Terraform Best Practices
|
||||||
|
|
||||||
@ -134,18 +136,20 @@ terraform-<PROVIDER>-<NAME>/
|
|||||||
│ │ ├── variables.tf
|
│ │ ├── variables.tf
|
||||||
│ │ └── outputs.tf
|
│ │ └── outputs.tf
|
||||||
│ └── submodule-b/
|
│ └── submodule-b/
|
||||||
│ ├── main.tf # No README = internal only
|
│ │ ├── main.tf # No README = internal only
|
||||||
│ ├── variables.tf
|
│ │ ├── variables.tf
|
||||||
│ └── outputs.tf
|
│ │ └── outputs.tf
|
||||||
└── examples/ # Usage examples directory
|
└── examples/ # Usage examples directory
|
||||||
├── basic/
|
│ ├── basic/
|
||||||
│ ├── README.md
|
│ │ ├── README.md
|
||||||
│ └── main.tf # Use external source, not relative paths
|
│ │ └── main.tf # Use external source, not relative paths
|
||||||
└── advanced/
|
│ └── advanced/
|
||||||
|
└── tests/ # Usage tests directory
|
||||||
|
│ └── <TEST_NAME>.tftest.tf
|
||||||
├── README.md
|
├── README.md
|
||||||
└── main.tf
|
└── main.tf
|
||||||
|
|
||||||
````
|
```
|
||||||
|
|
||||||
#### D. Code Organization
|
#### D. Code Organization
|
||||||
|
|
||||||
@ -193,7 +197,7 @@ terraform-<PROVIDER>-<NAME>/
|
|||||||
Name = "example"
|
Name = "example"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
````
|
```
|
||||||
|
|
||||||
**Variable and Output Ordering:**
|
**Variable and Output Ordering:**
|
||||||
|
|
||||||
@ -359,6 +363,7 @@ Before considering code generation complete, verify:
|
|||||||
- [ ] README includes usage examples
|
- [ ] README includes usage examples
|
||||||
- [ ] Workspace created/verified in HCP Terraform
|
- [ ] Workspace created/verified in HCP Terraform
|
||||||
- [ ] Initial run executed and plan reviewed
|
- [ ] Initial run executed and plan reviewed
|
||||||
|
- [ ] Unit tests for inputs and resources exist and succeed
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -384,3 +389,4 @@ Before considering code generation complete, verify:
|
|||||||
- [Module Development Best Practices](https://developer.hashicorp.com/terraform/language/modules/develop)
|
- [Module Development Best Practices](https://developer.hashicorp.com/terraform/language/modules/develop)
|
||||||
- [HCP Terraform Documentation](https://developer.hashicorp.com/terraform/cloud-docs)
|
- [HCP Terraform Documentation](https://developer.hashicorp.com/terraform/cloud-docs)
|
||||||
- [Terraform Registry](https://registry.terraform.io/)
|
- [Terraform Registry](https://registry.terraform.io/)
|
||||||
|
- [Terraform Test Documentation](https://developer.hashicorp.com/terraform/language/tests)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user