Skip to content

Conversation

Copy link

Copilot AI commented Jan 9, 2026

Provides Terraform implementations alongside existing Bicep templates for ACA, ACI, AKS, and ACR deployments. Both IaC tools now coexist, allowing users to choose based on their multi-cloud strategy or Azure-native preference.

Infrastructure Conversions

Azure Container Apps (ACA)

  • Resource group, ACR, Container Apps Environment, Container App
  • Auto-scaling (1-3 replicas) with HTTP rules
  • External ingress with registry secret injection

Azure Container Instance (ACI)

  • Resource group, ACR, Container Instance
  • Public IP with configurable CPU/memory
  • Default fallback to aci-helloworld image

Azure Kubernetes Service (AKS)

  • Resource group, ACR, AKS cluster
  • Kubelet identity with AcrPull role assignment
  • RBAC disabled (matches Bicep configuration)
  • Configurable node pool (count, VM size, OS disk)

Azure Container Registry (ACR)

  • Standalone module for reuse
  • Basic SKU with admin access

Files Added

azd/
├── TERRAFORM.md                    # Usage guide with examples
├── aca/
│   ├── main.tf                     # Provider config + resources
│   ├── variables.tf                # With validation rules
│   ├── outputs.tf
│   └── terraform.tfvars.example
├── aci/
│   ├── main.tf
│   ├── variables.tf
│   ├── outputs.tf
│   └── terraform.tfvars.example
├── aks/
│   ├── main.tf
│   ├── variables.tf
│   ├── outputs.tf
│   └── terraform.tfvars.example
└── acr/modules/acr.tf

Design Notes

  • Inline resources instead of module hierarchies for simplicity
  • String types for CPU/memory match Azure API requirements ("0.5", "1Gi")
  • Registry credentials always passed to match Bicep behavior
  • Sensitive outputs (passwords, usernames) properly marked
  • .gitignore updated for Terraform state files

Usage

cd azd/aca
terraform init
terraform apply \
  -var="environment_name=dev" \
  -var="location=eastus"

Or create terraform.tfvars:

environment_name = "dev"
location         = "eastus"
container_image  = "myapp"
cpu_cores        = "1.0"
memory_in_gb     = "2Gi"

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint-api.hashicorp.com
    • Triggering command: ./terraform ./terraform --version (dns block)
    • Triggering command: /tmp/terraform /tmp/terraform fmt -check (dns block)
    • Triggering command: /tmp/terraform /tmp/terraform init -backend=false 53 -j ACCEPT (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Rewrite hte Bicep with Terraform</issue_title>
<issue_description>Rewrite my Bicep with ...</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits January 9, 2026 11:57
Co-authored-by: sayedimac <25403967+sayedimac@users.noreply.github.com>
Co-authored-by: sayedimac <25403967+sayedimac@users.noreply.github.com>
…CR module

Co-authored-by: sayedimac <25403967+sayedimac@users.noreply.github.com>
Co-authored-by: sayedimac <25403967+sayedimac@users.noreply.github.com>
Copilot AI changed the title [WIP] Rewrite Bicep code using Terraform Add Terraform equivalents for all Bicep infrastructure templates Jan 9, 2026
Copilot AI requested a review from sayedimac January 9, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite hte Bicep with Terraform

2 participants