agentleFS
Microsoft AzureKnown publisherAzure/terraform-provider-aca/.github/copilot-instructions.md

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
  1. Distinctive:

    When adding support for a new ACA feature not yet in AzureRM:

    line 31
  2. Very specific:

    Terraform binary: use terraform (or a path specified in the task)

    line 52
  3. Very specific:

    Tags: all resources get environment = "dev" and managed_by = "terraform"

    line 54

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

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_resource patches 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:

  1. Add a feature flag in modules/container_app/variables.tf under the feature_flags object
  2. Add an azapi_update_resource in modules/container_app/main_azapi.tf that patches the property
  3. Use count conditional: count = var.feature_flags.new_feature && lookup(var.provider_overrides, "new_feature", "azapi") == "azapi" ? 1 : 0
  4. Target the latest GA API version (e.g., Microsoft.App/containerApps@2025-01-01)
  5. 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 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

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" and managed_by = "terraform"
  • Naming: examples use aca-{feature} prefix for resources
  • Resource groups: examples deploy to tf-aca-N resource 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 validate must pass for all examples
  • terraform plan should produce a clean plan
  • Deploy with terraform apply -auto-approve to a test resource group

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.