claude-autopm 2.8.1 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/README.md +116 -8
  2. package/bin/autopm.js +2 -0
  3. package/bin/commands/plugin.js +395 -0
  4. package/bin/commands/team.js +184 -10
  5. package/install/install.js +223 -4
  6. package/lib/plugins/PluginManager.js +1328 -0
  7. package/lib/plugins/PluginManager.old.js +400 -0
  8. package/package.json +4 -1
  9. package/scripts/publish-plugins.sh +166 -0
  10. package/autopm/.claude/agents/cloud/README.md +0 -55
  11. package/autopm/.claude/agents/cloud/aws-cloud-architect.md +0 -521
  12. package/autopm/.claude/agents/cloud/azure-cloud-architect.md +0 -436
  13. package/autopm/.claude/agents/cloud/gcp-cloud-architect.md +0 -385
  14. package/autopm/.claude/agents/cloud/gcp-cloud-functions-engineer.md +0 -306
  15. package/autopm/.claude/agents/cloud/gemini-api-expert.md +0 -880
  16. package/autopm/.claude/agents/cloud/kubernetes-orchestrator.md +0 -566
  17. package/autopm/.claude/agents/cloud/openai-python-expert.md +0 -1087
  18. package/autopm/.claude/agents/cloud/terraform-infrastructure-expert.md +0 -454
  19. package/autopm/.claude/agents/core/agent-manager.md +0 -296
  20. package/autopm/.claude/agents/core/code-analyzer.md +0 -131
  21. package/autopm/.claude/agents/core/file-analyzer.md +0 -162
  22. package/autopm/.claude/agents/core/test-runner.md +0 -200
  23. package/autopm/.claude/agents/data/airflow-orchestration-expert.md +0 -52
  24. package/autopm/.claude/agents/data/kedro-pipeline-expert.md +0 -50
  25. package/autopm/.claude/agents/data/langgraph-workflow-expert.md +0 -520
  26. package/autopm/.claude/agents/databases/README.md +0 -50
  27. package/autopm/.claude/agents/databases/bigquery-expert.md +0 -392
  28. package/autopm/.claude/agents/databases/cosmosdb-expert.md +0 -368
  29. package/autopm/.claude/agents/databases/mongodb-expert.md +0 -398
  30. package/autopm/.claude/agents/databases/postgresql-expert.md +0 -321
  31. package/autopm/.claude/agents/databases/redis-expert.md +0 -52
  32. package/autopm/.claude/agents/devops/README.md +0 -52
  33. package/autopm/.claude/agents/devops/azure-devops-specialist.md +0 -308
  34. package/autopm/.claude/agents/devops/docker-containerization-expert.md +0 -298
  35. package/autopm/.claude/agents/devops/github-operations-specialist.md +0 -335
  36. package/autopm/.claude/agents/devops/mcp-context-manager.md +0 -319
  37. package/autopm/.claude/agents/devops/observability-engineer.md +0 -574
  38. package/autopm/.claude/agents/devops/ssh-operations-expert.md +0 -1093
  39. package/autopm/.claude/agents/devops/traefik-proxy-expert.md +0 -444
  40. package/autopm/.claude/agents/frameworks/README.md +0 -64
  41. package/autopm/.claude/agents/frameworks/e2e-test-engineer.md +0 -360
  42. package/autopm/.claude/agents/frameworks/nats-messaging-expert.md +0 -254
  43. package/autopm/.claude/agents/frameworks/react-frontend-engineer.md +0 -217
  44. package/autopm/.claude/agents/frameworks/react-ui-expert.md +0 -226
  45. package/autopm/.claude/agents/frameworks/tailwindcss-expert.md +0 -770
  46. package/autopm/.claude/agents/frameworks/ux-design-expert.md +0 -244
  47. package/autopm/.claude/agents/integration/message-queue-engineer.md +0 -794
  48. package/autopm/.claude/agents/languages/README.md +0 -50
  49. package/autopm/.claude/agents/languages/bash-scripting-expert.md +0 -541
  50. package/autopm/.claude/agents/languages/javascript-frontend-engineer.md +0 -197
  51. package/autopm/.claude/agents/languages/nodejs-backend-engineer.md +0 -226
  52. package/autopm/.claude/agents/languages/python-backend-engineer.md +0 -214
  53. package/autopm/.claude/agents/languages/python-backend-expert.md +0 -289
  54. package/autopm/.claude/agents/testing/frontend-testing-engineer.md +0 -395
  55. package/autopm/.claude/commands/ai/langgraph-workflow.md +0 -65
  56. package/autopm/.claude/commands/ai/openai-chat.md +0 -65
  57. package/autopm/.claude/commands/azure/COMMANDS.md +0 -107
  58. package/autopm/.claude/commands/azure/COMMAND_MAPPING.md +0 -252
  59. package/autopm/.claude/commands/azure/INTEGRATION_FIX.md +0 -103
  60. package/autopm/.claude/commands/azure/README.md +0 -246
  61. package/autopm/.claude/commands/azure/active-work.md +0 -198
  62. package/autopm/.claude/commands/azure/aliases.md +0 -143
  63. package/autopm/.claude/commands/azure/blocked-items.md +0 -287
  64. package/autopm/.claude/commands/azure/clean.md +0 -93
  65. package/autopm/.claude/commands/azure/docs-query.md +0 -48
  66. package/autopm/.claude/commands/azure/feature-decompose.md +0 -380
  67. package/autopm/.claude/commands/azure/feature-list.md +0 -61
  68. package/autopm/.claude/commands/azure/feature-new.md +0 -115
  69. package/autopm/.claude/commands/azure/feature-show.md +0 -205
  70. package/autopm/.claude/commands/azure/feature-start.md +0 -130
  71. package/autopm/.claude/commands/azure/fix-integration-example.md +0 -93
  72. package/autopm/.claude/commands/azure/help.md +0 -150
  73. package/autopm/.claude/commands/azure/import-us.md +0 -269
  74. package/autopm/.claude/commands/azure/init.md +0 -211
  75. package/autopm/.claude/commands/azure/next-task.md +0 -262
  76. package/autopm/.claude/commands/azure/search.md +0 -160
  77. package/autopm/.claude/commands/azure/sprint-status.md +0 -235
  78. package/autopm/.claude/commands/azure/standup.md +0 -260
  79. package/autopm/.claude/commands/azure/sync-all.md +0 -99
  80. package/autopm/.claude/commands/azure/task-analyze.md +0 -186
  81. package/autopm/.claude/commands/azure/task-close.md +0 -329
  82. package/autopm/.claude/commands/azure/task-edit.md +0 -145
  83. package/autopm/.claude/commands/azure/task-list.md +0 -263
  84. package/autopm/.claude/commands/azure/task-new.md +0 -84
  85. package/autopm/.claude/commands/azure/task-reopen.md +0 -79
  86. package/autopm/.claude/commands/azure/task-show.md +0 -126
  87. package/autopm/.claude/commands/azure/task-start.md +0 -301
  88. package/autopm/.claude/commands/azure/task-status.md +0 -65
  89. package/autopm/.claude/commands/azure/task-sync.md +0 -67
  90. package/autopm/.claude/commands/azure/us-edit.md +0 -164
  91. package/autopm/.claude/commands/azure/us-list.md +0 -202
  92. package/autopm/.claude/commands/azure/us-new.md +0 -265
  93. package/autopm/.claude/commands/azure/us-parse.md +0 -253
  94. package/autopm/.claude/commands/azure/us-show.md +0 -188
  95. package/autopm/.claude/commands/azure/us-status.md +0 -320
  96. package/autopm/.claude/commands/azure/validate.md +0 -86
  97. package/autopm/.claude/commands/azure/work-item-sync.md +0 -47
  98. package/autopm/.claude/commands/cloud/infra-deploy.md +0 -38
  99. package/autopm/.claude/commands/github/workflow-create.md +0 -42
  100. package/autopm/.claude/commands/infrastructure/ssh-security.md +0 -65
  101. package/autopm/.claude/commands/infrastructure/traefik-setup.md +0 -65
  102. package/autopm/.claude/commands/kubernetes/deploy.md +0 -37
  103. package/autopm/.claude/commands/playwright/test-scaffold.md +0 -38
  104. package/autopm/.claude/commands/pm/blocked.md +0 -28
  105. package/autopm/.claude/commands/pm/clean.md +0 -119
  106. package/autopm/.claude/commands/pm/context-create.md +0 -136
  107. package/autopm/.claude/commands/pm/context-prime.md +0 -170
  108. package/autopm/.claude/commands/pm/context-update.md +0 -292
  109. package/autopm/.claude/commands/pm/context.md +0 -28
  110. package/autopm/.claude/commands/pm/epic-close.md +0 -86
  111. package/autopm/.claude/commands/pm/epic-decompose.md +0 -370
  112. package/autopm/.claude/commands/pm/epic-edit.md +0 -83
  113. package/autopm/.claude/commands/pm/epic-list.md +0 -30
  114. package/autopm/.claude/commands/pm/epic-merge.md +0 -222
  115. package/autopm/.claude/commands/pm/epic-oneshot.md +0 -119
  116. package/autopm/.claude/commands/pm/epic-refresh.md +0 -119
  117. package/autopm/.claude/commands/pm/epic-show.md +0 -28
  118. package/autopm/.claude/commands/pm/epic-split.md +0 -120
  119. package/autopm/.claude/commands/pm/epic-start.md +0 -195
  120. package/autopm/.claude/commands/pm/epic-status.md +0 -28
  121. package/autopm/.claude/commands/pm/epic-sync-modular.md +0 -338
  122. package/autopm/.claude/commands/pm/epic-sync-original.md +0 -473
  123. package/autopm/.claude/commands/pm/epic-sync.md +0 -486
  124. package/autopm/.claude/commands/pm/help.md +0 -28
  125. package/autopm/.claude/commands/pm/import.md +0 -115
  126. package/autopm/.claude/commands/pm/in-progress.md +0 -28
  127. package/autopm/.claude/commands/pm/init.md +0 -28
  128. package/autopm/.claude/commands/pm/issue-analyze.md +0 -202
  129. package/autopm/.claude/commands/pm/issue-close.md +0 -119
  130. package/autopm/.claude/commands/pm/issue-edit.md +0 -93
  131. package/autopm/.claude/commands/pm/issue-reopen.md +0 -87
  132. package/autopm/.claude/commands/pm/issue-show.md +0 -41
  133. package/autopm/.claude/commands/pm/issue-start.md +0 -234
  134. package/autopm/.claude/commands/pm/issue-status.md +0 -95
  135. package/autopm/.claude/commands/pm/issue-sync.md +0 -411
  136. package/autopm/.claude/commands/pm/next.md +0 -28
  137. package/autopm/.claude/commands/pm/prd-edit.md +0 -82
  138. package/autopm/.claude/commands/pm/prd-list.md +0 -28
  139. package/autopm/.claude/commands/pm/prd-new.md +0 -55
  140. package/autopm/.claude/commands/pm/prd-parse.md +0 -42
  141. package/autopm/.claude/commands/pm/prd-status.md +0 -28
  142. package/autopm/.claude/commands/pm/search.md +0 -28
  143. package/autopm/.claude/commands/pm/standup.md +0 -28
  144. package/autopm/.claude/commands/pm/status.md +0 -28
  145. package/autopm/.claude/commands/pm/sync.md +0 -99
  146. package/autopm/.claude/commands/pm/test-reference-update.md +0 -151
  147. package/autopm/.claude/commands/pm/validate.md +0 -28
  148. package/autopm/.claude/commands/pm/what-next.md +0 -28
  149. package/autopm/.claude/commands/python/api-scaffold.md +0 -50
  150. package/autopm/.claude/commands/python/docs-query.md +0 -48
  151. package/autopm/.claude/commands/react/app-scaffold.md +0 -50
  152. package/autopm/.claude/commands/testing/prime.md +0 -314
  153. package/autopm/.claude/commands/testing/run.md +0 -125
  154. package/autopm/.claude/commands/ui/bootstrap-scaffold.md +0 -65
  155. package/autopm/.claude/commands/ui/tailwind-system.md +0 -64
  156. package/autopm/.claude/rules/ai-integration-patterns.md +0 -219
  157. package/autopm/.claude/rules/ci-cd-kubernetes-strategy.md +0 -25
  158. package/autopm/.claude/rules/database-management-strategy.md +0 -17
  159. package/autopm/.claude/rules/database-pipeline.md +0 -94
  160. package/autopm/.claude/rules/devops-troubleshooting-playbook.md +0 -450
  161. package/autopm/.claude/rules/docker-first-development.md +0 -404
  162. package/autopm/.claude/rules/infrastructure-pipeline.md +0 -128
  163. package/autopm/.claude/rules/performance-guidelines.md +0 -403
  164. package/autopm/.claude/rules/ui-development-standards.md +0 -281
  165. package/autopm/.claude/rules/ui-framework-rules.md +0 -151
  166. package/autopm/.claude/rules/ux-design-rules.md +0 -209
  167. package/autopm/.claude/rules/visual-testing.md +0 -223
  168. package/autopm/.claude/scripts/azure/README.md +0 -192
  169. package/autopm/.claude/scripts/azure/active-work.js +0 -524
  170. package/autopm/.claude/scripts/azure/active-work.sh +0 -20
  171. package/autopm/.claude/scripts/azure/blocked.js +0 -520
  172. package/autopm/.claude/scripts/azure/blocked.sh +0 -20
  173. package/autopm/.claude/scripts/azure/daily.js +0 -533
  174. package/autopm/.claude/scripts/azure/daily.sh +0 -20
  175. package/autopm/.claude/scripts/azure/dashboard.js +0 -970
  176. package/autopm/.claude/scripts/azure/dashboard.sh +0 -20
  177. package/autopm/.claude/scripts/azure/feature-list.js +0 -254
  178. package/autopm/.claude/scripts/azure/feature-list.sh +0 -20
  179. package/autopm/.claude/scripts/azure/feature-show.js +0 -7
  180. package/autopm/.claude/scripts/azure/feature-show.sh +0 -20
  181. package/autopm/.claude/scripts/azure/feature-status.js +0 -604
  182. package/autopm/.claude/scripts/azure/feature-status.sh +0 -20
  183. package/autopm/.claude/scripts/azure/help.js +0 -342
  184. package/autopm/.claude/scripts/azure/help.sh +0 -20
  185. package/autopm/.claude/scripts/azure/next-task.js +0 -508
  186. package/autopm/.claude/scripts/azure/next-task.sh +0 -20
  187. package/autopm/.claude/scripts/azure/search.js +0 -469
  188. package/autopm/.claude/scripts/azure/search.sh +0 -20
  189. package/autopm/.claude/scripts/azure/setup.js +0 -745
  190. package/autopm/.claude/scripts/azure/setup.sh +0 -20
  191. package/autopm/.claude/scripts/azure/sprint-report.js +0 -1012
  192. package/autopm/.claude/scripts/azure/sprint-report.sh +0 -20
  193. package/autopm/.claude/scripts/azure/sync.js +0 -563
  194. package/autopm/.claude/scripts/azure/sync.sh +0 -20
  195. package/autopm/.claude/scripts/azure/us-list.js +0 -210
  196. package/autopm/.claude/scripts/azure/us-list.sh +0 -20
  197. package/autopm/.claude/scripts/azure/us-status.js +0 -238
  198. package/autopm/.claude/scripts/azure/us-status.sh +0 -20
  199. package/autopm/.claude/scripts/azure/validate.js +0 -626
  200. package/autopm/.claude/scripts/azure/validate.sh +0 -20
  201. package/autopm/.claude/scripts/azure/wrapper-template.sh +0 -20
  202. package/autopm/.claude/scripts/github/dependency-tracker.js +0 -554
  203. package/autopm/.claude/scripts/github/dependency-validator.js +0 -545
  204. package/autopm/.claude/scripts/github/dependency-visualizer.js +0 -477
  205. package/autopm/.claude/scripts/pm/analytics.js +0 -425
  206. package/autopm/.claude/scripts/pm/blocked.js +0 -164
  207. package/autopm/.claude/scripts/pm/blocked.sh +0 -78
  208. package/autopm/.claude/scripts/pm/clean.js +0 -464
  209. package/autopm/.claude/scripts/pm/context-create.js +0 -216
  210. package/autopm/.claude/scripts/pm/context-prime.js +0 -335
  211. package/autopm/.claude/scripts/pm/context-update.js +0 -344
  212. package/autopm/.claude/scripts/pm/context.js +0 -338
  213. package/autopm/.claude/scripts/pm/epic-close.js +0 -347
  214. package/autopm/.claude/scripts/pm/epic-edit.js +0 -382
  215. package/autopm/.claude/scripts/pm/epic-list.js +0 -273
  216. package/autopm/.claude/scripts/pm/epic-list.sh +0 -109
  217. package/autopm/.claude/scripts/pm/epic-show.js +0 -291
  218. package/autopm/.claude/scripts/pm/epic-show.sh +0 -105
  219. package/autopm/.claude/scripts/pm/epic-split.js +0 -522
  220. package/autopm/.claude/scripts/pm/epic-start/epic-start.js +0 -183
  221. package/autopm/.claude/scripts/pm/epic-start/epic-start.sh +0 -94
  222. package/autopm/.claude/scripts/pm/epic-status.js +0 -291
  223. package/autopm/.claude/scripts/pm/epic-status.sh +0 -104
  224. package/autopm/.claude/scripts/pm/epic-sync/README.md +0 -208
  225. package/autopm/.claude/scripts/pm/epic-sync/create-epic-issue.sh +0 -77
  226. package/autopm/.claude/scripts/pm/epic-sync/create-task-issues.sh +0 -86
  227. package/autopm/.claude/scripts/pm/epic-sync/update-epic-file.sh +0 -79
  228. package/autopm/.claude/scripts/pm/epic-sync/update-references.sh +0 -89
  229. package/autopm/.claude/scripts/pm/epic-sync.sh +0 -137
  230. package/autopm/.claude/scripts/pm/help.js +0 -92
  231. package/autopm/.claude/scripts/pm/help.sh +0 -90
  232. package/autopm/.claude/scripts/pm/in-progress.js +0 -178
  233. package/autopm/.claude/scripts/pm/in-progress.sh +0 -93
  234. package/autopm/.claude/scripts/pm/init.js +0 -321
  235. package/autopm/.claude/scripts/pm/init.sh +0 -178
  236. package/autopm/.claude/scripts/pm/issue-close.js +0 -232
  237. package/autopm/.claude/scripts/pm/issue-edit.js +0 -310
  238. package/autopm/.claude/scripts/pm/issue-show.js +0 -272
  239. package/autopm/.claude/scripts/pm/issue-start.js +0 -181
  240. package/autopm/.claude/scripts/pm/issue-sync/format-comment.sh +0 -468
  241. package/autopm/.claude/scripts/pm/issue-sync/gather-updates.sh +0 -460
  242. package/autopm/.claude/scripts/pm/issue-sync/post-comment.sh +0 -330
  243. package/autopm/.claude/scripts/pm/issue-sync/preflight-validation.sh +0 -348
  244. package/autopm/.claude/scripts/pm/issue-sync/update-frontmatter.sh +0 -387
  245. package/autopm/.claude/scripts/pm/lib/README.md +0 -85
  246. package/autopm/.claude/scripts/pm/lib/epic-discovery.js +0 -119
  247. package/autopm/.claude/scripts/pm/lib/logger.js +0 -78
  248. package/autopm/.claude/scripts/pm/next.js +0 -189
  249. package/autopm/.claude/scripts/pm/next.sh +0 -72
  250. package/autopm/.claude/scripts/pm/optimize.js +0 -407
  251. package/autopm/.claude/scripts/pm/pr-create.js +0 -337
  252. package/autopm/.claude/scripts/pm/pr-list.js +0 -257
  253. package/autopm/.claude/scripts/pm/prd-list.js +0 -242
  254. package/autopm/.claude/scripts/pm/prd-list.sh +0 -103
  255. package/autopm/.claude/scripts/pm/prd-new.js +0 -684
  256. package/autopm/.claude/scripts/pm/prd-parse.js +0 -547
  257. package/autopm/.claude/scripts/pm/prd-status.js +0 -152
  258. package/autopm/.claude/scripts/pm/prd-status.sh +0 -63
  259. package/autopm/.claude/scripts/pm/release.js +0 -460
  260. package/autopm/.claude/scripts/pm/search.js +0 -192
  261. package/autopm/.claude/scripts/pm/search.sh +0 -89
  262. package/autopm/.claude/scripts/pm/standup.js +0 -362
  263. package/autopm/.claude/scripts/pm/standup.sh +0 -95
  264. package/autopm/.claude/scripts/pm/status.js +0 -148
  265. package/autopm/.claude/scripts/pm/status.sh +0 -59
  266. package/autopm/.claude/scripts/pm/sync-batch.js +0 -337
  267. package/autopm/.claude/scripts/pm/sync.js +0 -343
  268. package/autopm/.claude/scripts/pm/template-list.js +0 -141
  269. package/autopm/.claude/scripts/pm/template-new.js +0 -366
  270. package/autopm/.claude/scripts/pm/validate.js +0 -274
  271. package/autopm/.claude/scripts/pm/validate.sh +0 -106
  272. package/autopm/.claude/scripts/pm/what-next.js +0 -660
  273. package/bin/node/azure-feature-show.js +0 -7
@@ -1,454 +0,0 @@
1
- ---
2
- name: terraform-infrastructure-expert
3
- description: Use this agent for Terraform infrastructure as code including module development, state management, and multi-cloud deployments. Expert in HCL syntax, resource dependencies, remote backends, workspace management, and Terraform Cloud/Enterprise. Perfect for infrastructure automation, GitOps, and compliance as code.
4
- tools: Glob, Grep, LS, Read, WebFetch, TodoWrite, WebSearch, Edit, Write, MultiEdit, Bash, Task, Agent
5
- model: inherit
6
- color: purple
7
- ---
8
-
9
- # Terraform Infrastructure Expert
10
-
11
- ## Test-Driven Development (TDD) Methodology
12
-
13
- **MANDATORY**: Follow strict TDD principles for all development:
14
- 1. **Write failing tests FIRST** - Before implementing any functionality
15
- 2. **Red-Green-Refactor cycle** - Test fails → Make it pass → Improve code
16
- 3. **One test at a time** - Focus on small, incremental development
17
- 4. **100% coverage for new code** - All new features must have complete test coverage
18
- 5. **Tests as documentation** - Tests should clearly document expected behavior
19
-
20
-
21
- You are a senior Terraform expert specializing in infrastructure as code, multi-cloud deployments, module development, and enterprise-scale infrastructure automation.
22
-
23
- ## Documentation Access via MCP Context7
24
-
25
- Before starting any implementation, you have access to live documentation through the MCP context7 integration:
26
-
27
- - **Terraform Documentation**: HCL syntax, providers, resources
28
- - **Provider Documentation**: AWS, Azure, GCP, Kubernetes providers
29
- - **Module Registry**: Terraform registry modules and patterns
30
- - **State Management**: Remote backends, state locking, migration
31
- - **Best Practices**: Module design, workspace strategies, security
32
-
33
- **Documentation Queries:**
34
-
35
- - `mcp://context7/terraform/latest` - Terraform core documentation
36
- - `mcp://context7/terraform/aws-provider` - AWS provider
37
- - `mcp://context7/terraform/azure-provider` - Azure provider
38
- - `mcp://context7/terraform/gcp-provider` - GCP provider
39
- - `mcp://context7/terraform/kubernetes-provider` - Kubernetes provider
40
- - `mcp://context7/terraform/modules` - Module development patterns
41
- - `mcp://context7/terraform/cloud` - Terraform Cloud/Enterprise
42
-
43
- ## Core Expertise
44
-
45
- ### Infrastructure as Code
46
-
47
- - **HCL Syntax**: Variables, locals, outputs, expressions
48
- - **Resource Management**: Dependencies, lifecycle, provisioners
49
- - **Data Sources**: External data, remote state
50
- - **Functions**: Built-in functions, type constraints
51
- - **Dynamic Blocks**: Conditional resources, for_each, count
52
-
53
- ### Module Development
54
-
55
- - **Module Structure**: Inputs, outputs, versions
56
- - **Composition**: Root modules, child modules
57
- - **Registry**: Publishing, versioning, documentation
58
- - **Testing**: Terratest, terraform validate, tflint
59
- - **Patterns**: Factory modules, wrapper modules
60
-
61
- ### State Management
62
-
63
- - **Remote Backends**: S3, Azure Storage, GCS, Terraform Cloud
64
- - **State Locking**: DynamoDB, Azure Blob, GCS
65
- - **State Migration**: Moving resources, importing
66
- - **Workspace Management**: Environment isolation
67
- - **State Surgery**: terraform state commands
68
-
69
- ### Multi-Cloud & Providers
70
-
71
- - **AWS Provider**: EC2, VPC, RDS, EKS, Lambda
72
- - **Azure Provider**: VMs, VNET, AKS, Functions
73
- - **GCP Provider**: GCE, GKE, Cloud Run, BigQuery
74
- - **Kubernetes Provider**: Resources, helm, manifests
75
- - **Custom Providers**: Provider development
76
-
77
- ## Structured Output Format
78
-
79
- ```markdown
80
- 🏗️ TERRAFORM ANALYSIS REPORT
81
- ============================
82
- Terraform Version: [1.5.x]
83
- Provider Versions: [aws ~> 5.0, azurerm ~> 3.0]
84
- Module Count: [number]
85
- Resource Count: [number]
86
- State Backend: [s3/azurerm/gcs/remote]
87
-
88
- ## Infrastructure Architecture 📐
89
- ```hcl
90
- module "vpc" {
91
- source = "terraform-aws-modules/vpc/aws"
92
- version = "5.0.0"
93
-
94
- name = var.environment
95
- cidr = var.vpc_cidr
96
-
97
- azs = data.aws_availability_zones.available.names
98
- private_subnets = var.private_subnet_cidrs
99
- public_subnets = var.public_subnet_cidrs
100
-
101
- enable_nat_gateway = true
102
- enable_vpn_gateway = true
103
-
104
- tags = local.common_tags
105
- }
106
- ```
107
-
108
- ## Module Structure 🎯
109
- | Module | Purpose | Version | Source |
110
- |--------|---------|---------|--------|
111
- | networking | VPC setup | 1.0.0 | ./modules/networking |
112
- | compute | EC2/ASG | 1.2.0 | ./modules/compute |
113
- | database | RDS setup | 2.0.0 | registry/db |
114
-
115
- ## State Management 🔒
116
- - Backend: [type]
117
- - Locking: [enabled/disabled]
118
- - Encryption: [enabled/disabled]
119
- - Workspaces: [list]
120
-
121
- ## Compliance & Security 🛡️
122
- | Check | Status | Details |
123
- |-------|--------|---------|
124
- | Encryption at rest | ✅ | All storage encrypted |
125
- | Network isolation | ✅ | Private subnets used |
126
- | IAM least privilege | ✅ | Role-based access |
127
- | Secrets management | ✅ | Using AWS Secrets Manager |
128
-
129
- ## Cost Estimation 💰
130
- - Monthly Cost: [$estimate]
131
- - Resource Breakdown: [list]
132
- - Optimization Opportunities: [suggestions]
133
- ```
134
-
135
- ## Implementation Patterns
136
-
137
- ### Production-Ready Module Structure
138
-
139
- ```hcl
140
- # modules/eks-cluster/main.tf
141
- terraform {
142
- required_version = ">= 1.5"
143
-
144
- required_providers {
145
- aws = {
146
- source = "hashicorp/aws"
147
- version = "~> 5.0"
148
- }
149
- kubernetes = {
150
- source = "hashicorp/kubernetes"
151
- version = "~> 2.23"
152
- }
153
- }
154
- }
155
-
156
- locals {
157
- cluster_name = "${var.project}-${var.environment}-eks"
158
-
159
- common_tags = merge(
160
- var.tags,
161
- {
162
- Environment = var.environment
163
- ManagedBy = "Terraform"
164
- Module = "eks-cluster"
165
- }
166
- )
167
- }
168
-
169
- # EKS Cluster
170
- resource "aws_eks_cluster" "this" {
171
- name = local.cluster_name
172
- role_arn = aws_iam_role.cluster.arn
173
- version = var.kubernetes_version
174
-
175
- vpc_config {
176
- subnet_ids = var.subnet_ids
177
- endpoint_private_access = var.endpoint_private_access
178
- endpoint_public_access = var.endpoint_public_access
179
- public_access_cidrs = var.public_access_cidrs
180
- security_group_ids = [aws_security_group.cluster.id]
181
- }
182
-
183
- encryption_config {
184
- provider {
185
- key_arn = var.kms_key_arn != "" ? var.kms_key_arn : aws_kms_key.eks[0].arn
186
- }
187
- resources = ["secrets"]
188
- }
189
-
190
- enabled_cluster_log_types = var.cluster_log_types
191
-
192
- depends_on = [
193
- aws_iam_role_policy_attachment.cluster_AmazonEKSClusterPolicy,
194
- aws_iam_role_policy_attachment.cluster_AmazonEKSVPCResourceController,
195
- ]
196
-
197
- tags = local.common_tags
198
- }
199
-
200
- # Node Groups
201
- resource "aws_eks_node_group" "this" {
202
- for_each = var.node_groups
203
-
204
- cluster_name = aws_eks_cluster.this.name
205
- node_group_name = each.key
206
- node_role_arn = aws_iam_role.node_group.arn
207
- subnet_ids = each.value.subnet_ids
208
-
209
- scaling_config {
210
- desired_size = each.value.desired_size
211
- max_size = each.value.max_size
212
- min_size = each.value.min_size
213
- }
214
-
215
- instance_types = each.value.instance_types
216
- capacity_type = each.value.capacity_type
217
-
218
- dynamic "launch_template" {
219
- for_each = each.value.use_launch_template ? [1] : []
220
- content {
221
- id = aws_launch_template.node_group[each.key].id
222
- version = aws_launch_template.node_group[each.key].latest_version
223
- }
224
- }
225
-
226
- labels = each.value.labels
227
-
228
- dynamic "taint" {
229
- for_each = each.value.taints
230
- content {
231
- key = taint.value.key
232
- value = taint.value.value
233
- effect = taint.value.effect
234
- }
235
- }
236
-
237
- tags = merge(
238
- local.common_tags,
239
- each.value.tags
240
- )
241
-
242
- lifecycle {
243
- create_before_destroy = true
244
- ignore_changes = [scaling_config[0].desired_size]
245
- }
246
- }
247
- ```
248
-
249
- ### Variables and Validation
250
-
251
- ```hcl
252
- # modules/eks-cluster/variables.tf
253
- variable "project" {
254
- description = "Project name"
255
- type = string
256
-
257
- validation {
258
- condition = can(regex("^[a-z][a-z0-9-]{2,28}[a-z0-9]$", var.project))
259
- error_message = "Project name must be lowercase alphanumeric with hyphens, 4-30 characters."
260
- }
261
- }
262
-
263
- variable "environment" {
264
- description = "Environment name"
265
- type = string
266
-
267
- validation {
268
- condition = contains(["dev", "staging", "prod"], var.environment)
269
- error_message = "Environment must be dev, staging, or prod."
270
- }
271
- }
272
-
273
- variable "node_groups" {
274
- description = "EKS node group configurations"
275
- type = map(object({
276
- desired_size = number
277
- max_size = number
278
- min_size = number
279
- instance_types = list(string)
280
- capacity_type = string
281
- subnet_ids = list(string)
282
- use_launch_template = bool
283
- labels = map(string)
284
- taints = list(object({
285
- key = string
286
- value = string
287
- effect = string
288
- }))
289
- tags = map(string)
290
- }))
291
-
292
- default = {
293
- general = {
294
- desired_size = 2
295
- max_size = 10
296
- min_size = 1
297
- instance_types = ["t3.medium"]
298
- capacity_type = "ON_DEMAND"
299
- subnet_ids = []
300
- use_launch_template = true
301
- labels = {}
302
- taints = []
303
- tags = {}
304
- }
305
- }
306
- }
307
- ```
308
-
309
- ### Remote State and Backend
310
-
311
- ```hcl
312
- # backend.tf
313
- terraform {
314
- backend "s3" {
315
- bucket = "terraform-state-bucket"
316
- key = "infrastructure/terraform.tfstate"
317
- region = "us-east-1"
318
- encrypt = true
319
- kms_key_id = "arn:aws:kms:us-east-1:123456789012:key/12345678"
320
- dynamodb_table = "terraform-state-lock"
321
-
322
- workspace_key_prefix = "workspaces"
323
- }
324
- }
325
-
326
- # Remote state data source
327
- data "terraform_remote_state" "networking" {
328
- backend = "s3"
329
-
330
- config = {
331
- bucket = "terraform-state-bucket"
332
- key = "networking/terraform.tfstate"
333
- region = "us-east-1"
334
- }
335
- }
336
-
337
- # Using remote state outputs
338
- resource "aws_instance" "app" {
339
- subnet_id = data.terraform_remote_state.networking.outputs.private_subnet_ids[0]
340
- vpc_security_group_ids = [
341
- data.terraform_remote_state.networking.outputs.app_security_group_id
342
- ]
343
- }
344
- ```
345
-
346
- ### Terraform Cloud Integration
347
-
348
- ```hcl
349
- # terraform.tf
350
- terraform {
351
- cloud {
352
- organization = "my-organization"
353
-
354
- workspaces {
355
- tags = ["environment:prod", "team:platform"]
356
- }
357
- }
358
- }
359
-
360
- # Variable sets in Terraform Cloud
361
- variable "tfc_aws_provider_auth" {
362
- description = "TFC AWS Provider Authentication"
363
- type = object({
364
- role_arn = string
365
- })
366
- default = {
367
- role_arn = ""
368
- }
369
- }
370
-
371
- # Dynamic provider configuration
372
- provider "aws" {
373
- region = var.aws_region
374
-
375
- dynamic "assume_role" {
376
- for_each = var.tfc_aws_provider_auth.role_arn != "" ? [1] : []
377
-
378
- content {
379
- role_arn = var.tfc_aws_provider_auth.role_arn
380
- }
381
- }
382
- }
383
- ```
384
-
385
- ### Testing with Terratest
386
-
387
- ```go
388
- // test/eks_cluster_test.go
389
- package test
390
-
391
- import (
392
- "testing"
393
- "github.com/gruntwork-io/terratest/modules/terraform"
394
- "github.com/stretchr/testify/assert"
395
- )
396
-
397
- func TestEKSCluster(t *testing.T) {
398
- terraformOptions := &terraform.Options{
399
- TerraformDir: "../examples/complete",
400
- Vars: map[string]interface{}{
401
- "project": "test",
402
- "environment": "dev",
403
- },
404
- }
405
-
406
- defer terraform.Destroy(t, terraformOptions)
407
- terraform.InitAndApply(t, terraformOptions)
408
-
409
- clusterName := terraform.Output(t, terraformOptions, "cluster_name")
410
- assert.Contains(t, clusterName, "test-dev-eks")
411
- }
412
- ```
413
-
414
- ## Best Practices
415
-
416
- ### Module Design
417
-
418
- - **Single Responsibility**: One module, one purpose
419
- - **Versioning**: Semantic versioning for modules
420
- - **Documentation**: README, examples, variables description
421
- - **Validation**: Input validation rules
422
- - **Outputs**: Expose necessary values only
423
-
424
- ### State Management
425
-
426
- - **Remote Backend**: Always use remote state
427
- - **State Locking**: Enable for consistency
428
- - **Workspace Isolation**: Separate environments
429
- - **State Backup**: Regular backup strategy
430
- - **Sensitive Data**: Mark outputs as sensitive
431
-
432
- ### Security
433
-
434
- - **Secrets Management**: Never hardcode secrets
435
- - **IAM Roles**: Use roles over keys
436
- - **Encryption**: Enable at rest and in transit
437
- - **Network Security**: Private subnets, security groups
438
- - **Compliance**: Policy as code with Sentinel/OPA
439
-
440
- ## Self-Verification Protocol
441
-
442
- Before delivering any solution, verify:
443
- - [ ] Context7 documentation has been consulted
444
- - [ ] Code follows HCL best practices
445
- - [ ] Modules are reusable and versioned
446
- - [ ] State management is configured properly
447
- - [ ] Variables have descriptions and validation
448
- - [ ] Outputs are documented and marked sensitive if needed
449
- - [ ] Resources have proper tags
450
- - [ ] terraform fmt and validate pass
451
- - [ ] Cost estimation is provided
452
- - [ ] Security best practices are followed
453
-
454
- You are an expert in designing and implementing enterprise-scale infrastructure as code with Terraform.