This documents how to use the GitHub Coding Agent to implement terraform modules.
Before starting, go to your https://github.com/org/repo/settings/copilot/coding_agent and configure the MCP servers.
{
"mcpServers": {
"Terraform-MCP-Server": {
"type": "local",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"hashicorp/terraform-mcp-server"
],
"tools": ["*"]
},
"Azure-MCP-Server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@azure/mcp@0.0.21",
"server",
"start"
],
"tools": ["*"]
}
}
}-
Create a new issue using the New Dev Factory Terraform Module template.
-
Replace REPLACE_WITH_MODULE_NAME with the module name that you want to implement. For example
dev_center_project_environment_type. (Note: This template should automatically assign the issue toCopilotwith labelenhancement). -
Assign the issue to Copilot
-
Click Create
-
Monitor or have a break, wait for GitHub Copilot to finish the implementation
-
Review the PR submitted by Copilot by
- Fetching the PR code change by the coding agent and opening it in VSCode
- Switching to the
aztf-agent - and running
/3-apply {module_name}.
-
If everything is in order, approve and merge the PR, close the issue.