terraform-provider-aca
Copilot instructions1 starsChanged 9 months agoMITView on GitHub
This is a Terraform facade module for Azure Container Apps (ACA) that wraps AzureRM and transparently uses AzAPI for preview/unsupported features. The key design pattern is: When adding support for a new ACA feature not yet in AzureRM: The ACA team publishes new API versions at Microsoft.App. Key resource types: - Microsoft.App/containerApps — the apps themselves - Microsoft.App/managedEnvironments — environments (VNet, workload profiles) - Microsoft.App/managedEnvironments/javaComponents — Java Spring components - Microsoft.App/sessionPools — dynamic sessions - Microsoft.App/jobs — container app jobs
The file
We split this copilot-instructions.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
When adding support for a new ACA feature not yet in AzureRM:
- Very specific: line 52
Terraform binary: use terraform (or a path specified in the task)
- Very specific: line 54
Tags: all resources get environment = "dev" and managed_by = "terraform"
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot Instructions — Terraform ACA Extension Layer
What This Repo Is
This is a Terraform facade module for Azure Container Apps (ACA) that wraps AzureRM and transparently uses AzAPI for preview/unsupported features. The key design pattern is:
- AzureRM for GA features — standard
azurerm_container_app,azurerm_container_app_environment, etc. - AzAPI overlays for gaps —
azapi_update_resourcepatches properties that AzureRM doesn't expose yet - Feature flags — users opt into AzAPI features via
feature_flags = { sticky_sessions = true }without changing their module calls
Repo Structure
├── modules/
│ ├── container_app/ # Main app module (azurerm + azapi overlays)
│ ├── container_app_environment/ # Environment module
│ ├── jobs/ # Container App Jobs
│ ├── networking/ # VNet, subnet, NSG
│ └── observability/ # Log Analytics, App Insights
├── examples/ # 16 deployable examples (each has main.tf, variables.tf, outputs.tf, terraform.tfvars)
├── docs/
│ ├── api-versions.json # Registry of tracked ACA API versions and feature coverage
│ └── migration-guide.md
├── tests/
└── scripts/AzAPI Overlay Pattern
When adding support for a new ACA feature not yet in AzureRM:
- Add a feature flag in
modules/container_app/variables.tfunder thefeature_flagsobject - Add an
azapi_update_resourceinmodules/container_app/main_azapi.tfthat patches the property - Use count conditional:
count = var.feature_flags.new_feature && lookup(var.provider_overrides, "new_feature", "azapi") == "azapi" ? 1 : 0 - Target the latest GA API version (e.g.,
Microsoft.App/containerApps@2025-01-01) - Create an example in
examples/showing the feature in action
ACA API Versions
The ACA team publishes new API versions at Microsoft.App. Key resource types:
Microsoft.App/containerApps— the apps themselvesMicrosoft.App/managedEnvironments— environments (VNet, workload profiles)Microsoft.App/managedEnvironments/javaComponents— Java Spring componentsMicrosoft.App/sessionPools— dynamic sessionsMicrosoft.App/jobs— container app jobs
API versions follow the pattern: YYYY-MM-DD (GA) or YYYY-MM-DD-preview (preview).
Key Conventions
- Terraform binary: use
terraform(or a path specified in the task) - Region: examples default to
swedencentral - Tags: all resources get
environment = "dev"andmanaged_by = "terraform" - Naming: examples use
aca-{feature}prefix for resources - Resource groups: examples deploy to
tf-aca-Nresource groups (N = example number) - Subnet delegation: Consumption-only environments must NOT have pre-delegated subnets (ACA sets it). Workload profiles environments REQUIRE pre-delegation.
ignore_changes = [delegation]on all ACA subnets to prevent Terraform drift
Testing
terraform validatemust pass for all examplesterraform planshould produce a clean plan- Deploy with
terraform apply -auto-approveto a test resource group
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

