← Prompts
Skill / Create Copilot Instructions Collection
Guidelines for generating modern Terraform code for Azure
Guidelines for generating modern Terraform code for Azure
## 1. Use Latest Terraform and Providers Always target the latest stable Terraform version and Azure providers. In code, specify the required Terraform and provider versions to enforce this. Keep provider versions updated to get new features and fixes. ## 2. Organize Code Cleanly Structure Terraform configurations with logical file separation: - Use `main.tf` for resources - Use `variables.tf` for inputs - Use `outputs.tf` for outputs - Follow consistent naming conventions and formatting (`terraform fmt`) This makes the code easy to navigate and maintain. ## 3. Encapsulate in Modules Use Terraform modules to group reusable infrastructure components. For any resource set that will be used in multiple contexts: - Create a module with its own variables/outputs - Reference it rather than duplicating code - This promotes reuse and consistency ## 4. Leverage Variables and Outputs - **Parameterize** all configurable values using variables with types and descriptions - **Provide default values** where appropriate for optional variables
Sign in to view the full prompt.
Sign InClassification
Skill Capability with explicit trigger pattern
Skill Create
Generate or transformScope Project
This codebase Manual Manually placed / Persistent