About Me

My photo
I am an MCSE in Data Management and Analytics, specializing in MS SQL Server, and an MCP in Azure. With over 19+ years of experience in the IT industry, I bring expertise in data management, Azure Cloud, Data Center Migration, Infrastructure Architecture planning, as well as Virtualization and automation. I have a deep passion for driving innovation through infrastructure automation, particularly using Terraform for efficient provisioning. If you're looking for guidance on automating your infrastructure or have questions about Azure, SQL Server, or cloud migration, feel free to reach out. I often write to capture my own experiences and insights for future reference, but I hope that sharing these experiences through my blog will help others on their journey as well. Thank you for reading!

High-Quality Prompt for Terraform Project Generation.

 

Beautiful, High-Quality Prompt for Terraform Project Generation

before executing this prompt in visual studio code copilot / or any IDE, ensure 
1. we have MCP Server for terraform and filesystem mcp server is already installed.  

extend if you want to update for number of resources.. 

Create a complete Terraform project with the following requirements:

📁 1. Folder Structure

  • Create a root folder named terraform-rak in C:\drive.

  • Inside this folder, create separate .tf files for each module or resource.

📄 2. Core Terraform Files

  1. variables.tf

    • Define all variables required by the project.

  2. variables_development.tfvars

    • Store all variable values for the development environment.

  3. backend.tf

    • 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.

🔹 Subnet

  • File: subnet.tf

  • Create:

    • A main subnet for workloads

    • An additional private endpoint subnet

🔹 Network Security Group (NSG)

  • File: network_security_group.tf

  • Create an NSG.

🔹 NSG Rules

  • File: network_security_rules.tf

  • Create security rules and:

    • Associate them with the NSG.

    • Associate the NSG with the subnet.

🔹 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)

🔹 Azure Container Apps Environment (CAE)

  • File: container_app_env.tf

  • Create a Container Apps Environment.

🔹 Container App

  • File: container_app.tf

  • Deploy a Container App and store its configuration here.

🔹 Azure Container Registry

  • File: container_registry.tf

  • Create an Azure Container Registry.

🔍 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:

    • Naming

    • Tagging

    • Security

    • Network configuration


Final Output Expectation

Generate:

  • A complete folder structure

  • Individual .tf files with correct module references and dependencies

  • A working Terraform configuration ready to run with: