Beautiful, High-Quality Prompt for Terraform Project Generation
Create a complete Terraform project with the following requirements:
📁 1. Folder Structure
-
Create a root folder named
terraform-rakinC:\drive. -
Inside this folder, create separate .tf files for each module or resource.
📄 2. Core Terraform Files
-
-
Define all variables required by the project.
-
-
-
Store all variable values for the development environment.
-
-
-
Configure a remote backend using an Azure Storage Account.
-
Ensure the Terraform state file is stored in a storage container.
-
🌐 3. Azure Resources (Each in Its Own File Using Azure Verified Modules)
🔹 Resource Group
-
File:
resource_group.tf -
Create a resource group.
🔹 Virtual Network
-
File:
vnet.tf -
Create a virtual network.
use Azure verified modules
- VNet with 10.0.0.0/16 address space
- Main subnet (10.0.1.0/24) with Container Apps delegation
- Private endpoint subnet (10.0.2.0/24)
🔹 Subnet
-
File:
subnet.tf -
Create:
-
A main subnet for workloads
-
An additional private endpoint subnet
use azure verified modules
-
🔹 Network Security Group (NSG)
-
Create an NSG.
Create Azure Verified Modules
🔹 NSG Rules
-
Create security rules and:
-
Associate them with the NSG.
-
Associate the NSG with the subnet.
Use Azure Verified Modules
-
🔹 Route Table
-
File:
route_table.tf -
Create a route table with:
-
A route to the internet
-
A route to a virtual appliance (ASA firewall IP address)
Use Azure Verified Modules
-
🔹 Azure Container Apps Environment (CAE)
-
File:
container_app_env.tf -
Create a Container Apps Environment
Use Azure Verified Modules.
🔹 Container App
-
File:
container_app.tf -
Deploy a Container App and store its configuration here.
Use Azure Verified Modules
enable system-assigned identity.
🔹 Azure Container Registry
-
File:
container_registry.tf -
Create an Azure Container Registry.
use Azure verified moduled
ensure RBAC and ABACs are configured
create private endpoint
- Azure Container Registry (Premium SKU)
- Container Apps Environment with VNet integration
- Container App with auto-scaling (1-10 replicas)
- Health probes (liveness and readiness)
- RBAC integration between Container Apps and ACR
🔍 4. Diagnostics & Monitoring
-
Create
diagnostic_settings.tf. -
Create a Log Analytics Workspace.
-
Enable diagnostic settings for every resource in the project.
✅ Additional Requirements
-
Use Azure Verified Terraform Modules for every resource.
-
Ensure all resources follow best practices for:
✨ Final Output Expectation
Generate:
-
A complete folder structure
-
Individual
.tffiles with correct module references and dependencies -
A working Terraform configuration ready to run with:

No comments:
Post a Comment