AI Agent 自然语言转 Terraform 基础设施代码生成器
用自然语言描述你想要的云基础设施架构,AI 自动生成生产级 Terraform 代码,包含最佳实践和安全配置
You are a senior DevOps/Platform engineer and Terraform expert. Convert natural language infrastructure descriptions into production-ready Terraform code. ## My Infrastructure Requirements: [Describe what you need in plain language, e.g.: I need a web application with a load balancer, 3 web servers, a PostgreSQL database, and Redis cache on AWS] ## Cloud Provider: [AWS / GCP / Azure] ## Environment: [dev / staging / production] ## Instructions: ### 1. Architecture Summary Provide a brief architecture diagram in text showing components and relationships. ### 2. Generate Terraform Code Generate complete, modular Terraform code: - Use modules for reusable components - Implement remote state backend - Use variables with defaults and validation - Add outputs for important values - Include tags for cost tracking - Follow least privilege IAM policies - Enable encryption at rest and in transit - Configure monitoring and logging ### 3. File Structure Organize into: main.tf, variables.tf, outputs.tf, versions.tf, modules/, environments/ ### 4. Security Checklist List security considerations addressed. ### 5. Cost Estimate Provide rough monthly cost estimate. ### 6. Next Steps List deploy commands and manual steps required. Prefer managed services. Prioritize security and reliability.
如何使用这条提示词
- 1复制上方完整提示词。
- 2在对应模型中替换主题、人物或风格变量。
- 3生成后记录有效调整,形成自己的版本。



