Agent skill

Apex Terraform Patterns

by jonathan-vella in jonathan-vella/apex

UTILITY SKILL — Reusable Azure Terraform patterns: hub-spoke, private endpoints, diagnostics, AVM-TF modules.

MITAuto-check passedDevOps & Cloud

Install Apex Terraform Patterns

skills CLI
$ npx skills add jonathan-vella/apex --skill apex-terraform-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jonathan-vella/apex apex-terraform-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jonathan-vella/apex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/apex-terraform-patterns .claude/skills/apex-terraform-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
apex-terraform-patterns
GitHub stars
217
Token cost
~2.2k tokens
SKILL.md length
681 words
Files
17 (incl. references)
Skills in repo
39
Repo updated
First seen
Licence
MIT

At a glance

UTILITY SKILL — Reusable Azure Terraform patterns: hub-spoke, private endpoints, diagnostics, AVM-TF modules.

  • Works in 7 steps: Identify the pattern — match your need… → Load the reference — read the linked… → Compose AVM modules — wire outputs as… → …
  • : Bicep code (apex-azure-bicep-patterns)
  • SKILL.md covers Quick Reference, Canonical Example — Module…, Rules and Steps, plus 2 more sections
  • Calls npm and terraform

What it does

Apex Terraform Patterns is an agent skill from jonathan-vella/apex. UTILITY SKILL — Reusable Azure Terraform patterns: hub-spoke, private endpoints, diagnostics, AVM-TF modules. WHEN: "hub-spoke Terraform", "private endpoint module", "AVM-TF composition", "diagnostic settings", "plan interpretation". DO NOT USE FOR: Bicep code (apex-azure-bicep-patterns), ADRs (apex-azure-adr), diagrams (apex-python-diagrams).

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 17 other files, including reference files (for example `references/avm-authoring-requirements.md`, `references/avm-pitfalls.md` and `references/avm-provider-compatibility.md`). Compatibility notes: Requires Terraform = 1.11, azurerm ~ 4.0, Azure CLI

It sits in DevOps & Cloud, covering Infrastructure as code and Architecture decision records. It works with Terraform, Bicep, Microsoft Azure and Python. The repository describes itself as: APEX turns Azure platform engineering requirements into verified, deploy-ready IaC — powered by GitHub Copilot agents, real-time pricing, and built-in compliance. The licence is MIT.

When your agent uses it

  • : Bicep code (apex-azure-bicep-patterns)
  • ADRs (apex-azure-adr)
  • Diagrams (apex-python-diagrams)

Example prompts

  • “hub-spoke Terraform”
  • “private endpoint module”
  • “AVM-TF composition”
  • “/apex-terraform-patterns”

Requirements

  • Compatibility (from SKILL.md): Requires Terraform >= 1.11, azurerm ~> 4.0, Azure CLI

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Identify the pattern — match your need to a row in Quick Reference (hub-spoke, private endpoint, diagnostics, conditional, identity…
  2. Load the reference — read the linked references/*.md; do not load all at once
  3. Compose AVM modules — wire outputs as inputs (see Canonical Example); never hardcode IDs
  4. Pin the provider — ~> 4.0 only; do not use >= 3.0 or exact = 4.x.y
  5. Add diagnostics + budget — every resource gets diagnostics; every deployment implements the governed cost-monitoring contract
  6. Plan before apply — terraform plan -out=plan.tfplan; review for ~/-/+/- operations against references/plan-interpretation.md
  7. Validate — terraform fmt -check, terraform validate, npm run validate:terraform, npm run validate:iac-security-baseline

What it can do on your machine

Read from SKILL.md and the folder at commit 15a629a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • terraform

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Terraform >= 1.11, azurerm ~> 4.0, Azure CLI

    From compatibility in the SKILL.md frontmatter.

Context cost

Apex Terraform Patterns loads about 2.2k tokens when it runs, and up to ~20k if it reads all its reference files. Until then it costs about 93 tokens; SKILL.md has 681 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~93
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~20k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jonathan-vella/apex at commit 15a629a, republished under its MIT licence (© jonathan-vella). 681 words, ~2,166 tokens.

Download SKILL.mdSave it as .claude/skills/apex-terraform-patterns/SKILL.md (or your agent's skills folder). This skill also uses 16 other files; get the full folder from GitHub.
name
apex-terraform-patterns
description
**UTILITY SKILL** — Reusable Azure Terraform patterns: hub-spoke, private endpoints, diagnostics, AVM-TF modules. WHEN: "hub-spoke Terraform", "private endpoint module", "AVM-TF composition", "diagnostic settings", "plan interpretation". DO NOT USE FOR: Bicep code (apex-azure-bicep-patterns), ADRs (apex-azure-adr), diagrams (apex-python-diagrams).
compatibility
Requires Terraform >= 1.11, azurerm ~> 4.0, Azure CLI
user-invocable
false
disable-model-invocation
false

Azure Terraform Patterns Skill

Composable architecture building blocks for Azure Terraform. Complements iac-terraform-best-practices.instructions.md (style) and apex-azure-defaults skill (naming, tags, regions).

Canonical sources — the security baseline, AVM-first mandate, naming conventions, required tags, and unique-suffix rule live in apex-azure-defaults/SKILL.md and iac-policy-compliance.md. This skill restates the rules tersely below for IaC-output convenience only; in conflict, the canonical sources win.


Quick Reference

PatternWhen to UseReference
Hub-Spoke NetworkingMulti-workload environments with shared servicesreferences/hub-spoke-pattern.md
Private Endpoint WiringAny PaaS service requiring private connectivityreferences/private-endpoint-pattern.md
Diagnostic SettingsEvery deployed resource (mandatory)references/common-patterns.md
Conditional DeploymentOptional resources controlled by variablesreferences/common-patterns.md
Module CompositionCalling multiple AVM modules in root moduleSee inline example below
Managed IdentityAny service-to-service authenticationreferences/common-patterns.md
Budget & Cost MonitoringEvery deployment (mandatory)references/budget-pattern.md
Plan InterpretationPre-deployment validation and change analysisreferences/plan-interpretation.md
AVM PitfallsSet-type diffs, provider pins, 4.x changesreferences/avm-pitfalls.md
Provider CompatibilityWhy azurerm 4.x / Terraform 1.11 floorsreferences/avm-provider-compatibility.md
AVM AuthoringAVM certification requirements, compliancereferences/avm-authoring-requirements.md
Module RefactoringMonolith → module extraction, state migrationreferences/refactor-module.md

Canonical Example — Module Composition

Wire AVM child modules by passing outputs as inputs (module.<name>.<output>); never hardcode IDs. AVM-TF module versions in APEX-generated code MUST be exact semver (version = "X.Y.Z") — pinned at plan time from registry.terraform.io (newest stable in modules[0].versions[]). Range constraints (~> X.Y, >= X.Y.Z) are NOT allowed in 04-iac-contract.json and will be flagged by npm run validate:avm-versions. Full code sample (resource group + key vault) and rationale in references/module-composition.md.


Rules

  • AVM-first: Use Azure/avm-res-* registry modules over raw azurerm_* resources
  • AVM-TF version pins: Use exact semver resolved from the Registry API at plan time; follow the apex-azure-defaults exception policy
  • Hub-spoke: Spokes peer to hub only; never spoke-to-spoke
  • Private endpoints: Apply the canonical private-networking baseline and resolve DNS component ownership per the private-endpoint pattern; do not duplicate central or DINE resources.
  • Diagnostics: Every resource MUST have a diagnostic setting → Log Analytics
  • Conditional: Use for_each (keyed) over count (indexed) for named resources
  • Identity: SystemAssigned managed identity + RBAC; avoid keys/connection strings
  • Provider pin: ~> 4.0 (allows 4.x patches, blocks 5.0 until AVM modules accept it — see references/avm-provider-compatibility.md)
  • Telemetry: Set enable_telemetry = false in restricted-network environments
  • Moved blocks: Use moved {} when renaming resources to prevent destroy/recreate
  • Budget: Follow the canonical cost-monitoring contract; amount and notification inputs MUST be variables
Show full SKILL.md (318 more words)Show less

Steps

Applying a Terraform pattern in a root module:

  1. Identify the pattern — match your need to a row in Quick Reference (hub-spoke, private endpoint, diagnostics, conditional, identity, budget, plan interpretation)
  2. Load the reference — read the linked references/*.md; do not load all at once
  3. Compose AVM modules — wire outputs as inputs (see Canonical Example); never hardcode IDs
  4. Pin the provider — ~> 4.0 only; do not use >= 3.0 or exact = 4.x.y
  5. Add diagnostics + budget — every resource gets diagnostics; every deployment implements the governed cost-monitoring contract
  6. Plan before apply — terraform plan -out=plan.tfplan; review for ~/-/+/- operations against references/plan-interpretation.md
  7. Validate — terraform fmt -check, terraform validate, npm run validate:terraform, npm run validate:iac-security-baseline

Gotchas

  • Set-type phantom diffs — azurerm_application_gateway, azurerm_lb, azurerm_network_security_group, azurerm_firewall, azurerm_frontdoor: adding ONE element causes ALL elements to show ~ changes. Mitigation: inspect the plan's actual changes. Use ignore_changes only for blocks managed externally; do not suppress Terraform-owned changes just to hide noisy diffs.
  • Provider pin ~> 4.0 is critical — >= 3.0 crosses breaking versions; = 4.1.0 blocks patches. MUST use ~> 4.0.
  • for_each over count for named resources — count causes drift when items are inserted/removed (Terraform reindexes). Use for_each = toset().
  • moved block required for renaming — Renaming a resource ID without a moved {} block causes destroy + recreate.
  • azurerm 4.x renamed attributes — allow_blob_public_access → allow_nested_items_to_be_public; enable_https_traffic_only → https_traffic_only_enabled; azurerm_app_service removed → use azurerm_linux_web_app.

Reference Index

FileContents
references/hub-spoke-pattern.mdFull hub & spoke VNet + peering HCL
references/private-endpoint-pattern.mdPE + DNS zone + VNet link HCL, subresource table
references/common-patterns.mdDiagnostics, conditional deployment, module composition, identity
references/budget-pattern.mdConsumption budget, forecast alerts, anomaly detection
references/plan-interpretation.mdPlan commands, change symbols, red flags, summary script
references/avm-pitfalls.mdSet-type diffs, provider pins, tag ignore, moved blocks, 4.x
references/avm-provider-compatibility.mdAVM-TF module provider/Core constraints, azurerm 5.x revisit
references/tf-best-practices-examples.mdBest-practice code examples, formatting, code review checklist
references/bootstrap-backend-template.mdBackend bootstrap template
references/deploy-script-template.mdDeployment script template
references/project-scaffold.mdProject scaffolding structure
references/avm-authoring-requirements.mdAVM certification: 37 requirements, compliance checklist
references/refactor-module.mdModule extraction, state migration, refactoring patterns
references/module-composition.mdCanonical AVM module composition example with output wiring

© jonathan-vella, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 16 other files (references) in .github/skills/apex-terraform-patterns of jonathan-vella/apex.

  • SKILL.md
  • references/avm-authoring-requirements.md
  • references/avm-pitfalls.md
  • references/avm-provider-compatibility.md
  • references/azuread-pattern.md
  • references/bootstrap-backend-template.md
  • references/budget-pattern.md
  • references/codegen-validation-checklist.md
  • references/common-patterns.md
  • references/deploy-script-template.md
  • references/hub-spoke-pattern.md
  • references/module-composition.md
  • references/plan-interpretation.md
  • references/private-endpoint-pattern.md
  • references/project-scaffold.md
  • references/refactor-module.md
  • references/tf-best-practices-examples.md

Open the folder on GitHubat commit 15a629a

Compare with similar skills

Apex Terraform Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Apex Terraform Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apex Terraform Patterns this skilljonathan-vella/apex217—~2.2kAutomated safety check: PassMIT
Azure Preparemicrosoft/GitHub-Copilot-for-Azure2551 repos~3.2kAutomated safety check: PassMIT
Azure Firmware AnalysisMicrosoftDocs/Agent-Skills777—~1.2kAutomated safety check: PassCC-BY-4.0
Azure Architecture Autopilotgithub/awesome-copilot40k1 repos~1.9kAutomated safety check: PassMIT
Terraform Azurerm Set Diff Analyzergithub/awesome-copilot40k1 repos~547Automated safety check: PassMIT
Iac Securityhardw00t/ai-security-arsenal104—~2.4kAutomated safety check: PassNone

Similar skills

  • Azure Prepare

    microsoft/GitHub-Copilot-for-Azure

    Official

    Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow.

    255 GitHub starsUsed in 1 repo~3.2k tokens
    DevOps & CloudAuto-check passed
  • Azure Firmware Analysis

    MicrosoftDocs/Agent-Skills

    Official

    Expert knowledge for Azure Firmware Analysis development including best practices, security, integrations & coding patterns, and deployment.

    777 GitHub stars~1.2k tokensUpdated 4 days ago
    DevOps & CloudAuto-check passed
  • Azure Architecture Autopilot

    github/awesome-copilot

    Official

    Designs Azure infrastructure from a natural-language description, or diagrams an existing resource group, then refines the design through conversation and deploys it with Bicep.

    40k GitHub starsUsed in 1 repo~1.9k tokens
    DevOps & CloudAuto-check passed
  • Official

    Analyze Terraform plan JSON output for AzureRM Provider to distinguish between false-positive diffs (order-only changes in Set-type attributes) and actual resource changes.

    40k GitHub starsUsed in 1 repo~547 tokens
    DevOps & CloudAuto-check passed
  • Iac Security

    hardw00t/ai-security-arsenal

    Infrastructure-as-Code security scanning router for Terraform, CloudFormation, Kubernetes manifests, Helm, ARM/Bicep.

    104 GitHub stars~2.4k tokensUpdated 5 mo ago
    DevOps & CloudAuto-check passed
  • Azure Deploy

    microsoft/GitHub-Copilot-for-Azure

    Official

    Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files.

    255 GitHub starsUsed in 1 repo~1.6k tokens
    DevOps & CloudAuto-check passed

More from jonathan-vella/apex

All 39 skills in this repo
  • Apex Azure Diagnostics

    jonathan-vella/apex

    WORKFLOW SKILL — Debug Azure production issues: Container Apps, Functions, App Service, AKS, VMs and messaging, with KQL log analysis.

    217 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • ANALYSIS SKILL — Azure Policy discovery: effective assignments (incl.

    217 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Apex Context Management

    jonathan-vella/apex

    UTILITY SKILL — Two-mode context-window management. An agent skill from jonathan-vella/apex.

    217 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Apex Python Diagrams

    jonathan-vella/apex

    UTILITY SKILL — Python diagram generation for Azure architectures, WAF/cost/compliance charts, ERDs, swimlanes, timelines, and wireframes.

    217 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Apex Terraform Search Import

    jonathan-vella/apex

    WORKFLOW SKILL — Manual-only discovery and import of existing Azure resources into Terraform management.

    217 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Apex Vendor Prompting

    jonathan-vella/apex

    ANALYSIS SKILL — Manual-only audit of Anthropic Claude Opus 5.5 / Sonnet 5.5 and OpenAI GPT-6 / GPT-5.6 prompting guidance and APEX conventions.

    217 GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Apex Terraform Patterns

What does Apex Terraform Patterns do?

UTILITY SKILL — Reusable Azure Terraform patterns: hub-spoke, private endpoints, diagnostics, AVM-TF modules. Apex Terraform Patterns is an agent skill from jonathan-vella/apex. UTILITY SKILL — Reusable Azure Terraform patterns: hub-spoke, private endpoints, diagnostics, AVM-TF modules.

When should I use Apex Terraform Patterns?

Apex Terraform Patterns fits situations like: : Bicep code (apex-azure-bicep-patterns); ADRs (apex-azure-adr); diagrams (apex-python-diagrams).

How do I install Apex Terraform Patterns in Claude Code?

Run `npx skills add jonathan-vella/apex --skill apex-terraform-patterns -a claude-code`. Or copy the skill folder (.github/skills/apex-terraform-patterns in jonathan-vella/apex) into .claude/skills/apex-terraform-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Apex Terraform Patterns in Codex?

Run `npx skills add jonathan-vella/apex --skill apex-terraform-patterns -a codex`. Or copy the skill folder (.github/skills/apex-terraform-patterns in jonathan-vella/apex) into .agents/skills/apex-terraform-patterns in your project. Codex loads it when a task matches its description.

Can I use Apex Terraform Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jonathan-vella/apex --skill apex-terraform-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/apex-terraform-patterns, .gemini/skills/apex-terraform-patterns, .github/skills/apex-terraform-patterns and .opencode/skills/apex-terraform-patterns in your project.

What does Apex Terraform Patterns need to run?

Going by SKILL.md and its folder, Apex Terraform Patterns needs the command-line tools its instructions call (npm and terraform). Compatibility (from SKILL.md): Requires Terraform >= 1.11, azurerm ~> 4.0, Azure CLI.

Does Apex Terraform Patterns access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Apex Terraform Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Apex Terraform Patterns use?

Apex Terraform Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Apex Terraform Patterns use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 18k tokens, read only when the agent opens those files.

What are the alternatives to Apex Terraform Patterns?

Skills that share tags, products or a category with Apex Terraform Patterns: Azure Prepare (microsoft/GitHub-Copilot-for-Azure, 255 stars), Azure Firmware Analysis (MicrosoftDocs/Agent-Skills, 777 stars), Azure Architecture Autopilot (github/awesome-copilot, 40k stars) and Terraform Azurerm Set Diff Analyzer (github/awesome-copilot, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apex Terraform Patterns?

jonathan-vella (a GitHub user) maintains it in jonathan-vella/apex, which has 217 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on October 8, 2026.

Source: jonathan-vella/apex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.