ProfessionalInfrastructure as Code
AVM-aligned Terraform module library for landing-zone deployments
A catalogue of Terraform modules built on Azure Verified Modules — AKS, Container Registry, AI Foundry, Azure OpenAI, AI Search, Data Factory and Databricks — with security controls exposed as first-class inputs.
- Role
- Module author — design, implementation, examples and versioning
- Context
- ALIANDO · Cloud Factory initiative
- Period
- 2026
01Overview
Landing-zone deployments are only as fast and as safe as the modules they are assembled from. I built Terraform modules aligned with Azure Verified Modules (AVM) standards so that teams could compose platforms from tested, versioned building blocks — with private networking, encryption, identity and diagnostics available by design rather than bolted on.
02Context
Part of ALIANDO’s “Cloud Factory” initiative, whose goal is to accelerate and standardise Azure landing-zone deployments. AVM is Microsoft’s standard for Terraform and Bicep modules, defining consistent interfaces for cross-cutting concerns such as private endpoints, locks, role assignments and diagnostic settings.
03Problem statement
Without a shared module layer, each deployment re-implements the same resources slightly differently, and security controls depend on whoever writes the code that day. The library needed to give consumers a simple, stable interface while staying close enough to upstream AVM to absorb its improvements.
04My responsibilities
- Designed and implemented module wrappers on top of official AVM resource modules, pinning upstream versions.
- Authored scenario-based examples for each module (default, private endpoint, customer-managed keys and others).
- Maintained a CHANGELOG per module and evolved modules as upstream AVM versions changed.
- Defined composition boundaries between modules (for example, AI Foundry consuming AI Search from its dedicated module).
05Architecture overview
Each module wraps a pinned upstream AVM module behind a typed interface of variables and outputs, ships runnable examples and a changelog, and is checked with terraform validate and tfsec static analysis. All modules expose the same cross-cutting interfaces — private endpoints, customer-managed keys, managed identities, RBAC role assignments, diagnostic settings and resource locks — so a landing zone can apply one security posture across every service.
- External / reference
- Code & configuration
- Delivery & automation
- Security control
- Azure service
- Observability
Text description of the diagram
Upstream Azure Verified Modules are wrapped by a module with a typed interface, examples and a changelog. Modules pass terraform validate and tfsec before being consumed by landing-zone deployments. Every module exposes private endpoints, customer-managed keys, managed identity, RBAC, diagnostics and locks.
Flows
- Upstream AVM module → Typed interface (wraps)
- Wrapper module (one per service) → terraform validate
- terraform validate → tfsec
- tfsec → Landing zones (consumed by)
- Wrapper module (one per service) → Cross-cutting interfaces exposed by every module (exposes)
Components
Upstream AVM module · Typed interface · Scenario examples · CHANGELOG · terraform validate · tfsec · Landing zones · Private endpoints · CMK · Managed identity · RBAC · Diagnostics · Locks
06Technology stack
- Terraform
- Terraform 1.x
- azurerm 4.x
- azapi 2.x
- modtm (AVM telemetry)
- random
- time
- Upstream standard
- Azure Verified Modules (avm-res-*)
- avm-utl-interfaces
- avm-utl-regions
- Quality
- terraform validate
- tfsec
- terraform-docs
- CHANGELOG
- Modules
- AKS
- Container Registry
- AI Foundry
- Azure OpenAI / Cognitive Services
- AI Search
- Data Factory
- Databricks
07Implementation approach
- AKS: built from the AVM managed-cluster module and later upgraded to a newer upstream release, with examples ranging from default and private clusters to a secure-baseline private cluster and a WAF-aligned configuration.
- Container Registry: based on the AVM registry module, with examples for geo-replication, private endpoints, CMK encryption, scope maps and registry tokens.
- AI Foundry: supports both BYOR (bring your own resources — existing Cosmos DB, Key Vault and Storage) and CYOR (create them inline) patterns, plus a private-endpoint example with public access disabled and DNS managed by Azure Policy.
- Azure OpenAI / Cognitive Services: a wrapper that mirrors the full upstream interface — 39 inputs and 11 outputs — with examples for private endpoints, CMK, disabled local auth and Responsible AI policies.
- Data Factory, AI Search and Databricks: managed-identity, private-endpoint and diagnostic-settings support, with self-hosted integration runtimes and linked services for Data Factory and VNet injection plus access connectors for Databricks.
08Challenges & engineering decisions
Challenge
Keeping wrappers close to upstream AVM without exposing consumers to every upstream change.
Decision
Pin the upstream module version and record every bump in a per-module CHANGELOG, so upgrades are deliberate, reviewable events.
Challenge
Overlapping responsibilities between modules — AI Foundry depends on AI Search, which already has its own naming, networking and RBAC conventions.
Decision
Never create AI Search inside the AI Foundry module; consume it by resource ID from its dedicated module. One resource, one owner.
Challenge
Proof-of-concept deployments and production landing zones need different dependency models.
Decision
Support both BYOR (recommended for production and landing zones) and CYOR (convenient for PoCs and demos), documented side by side in the examples.
09Security considerations
- Private endpoints, customer-managed keys, managed identities, RBAC role assignments and resource locks are module inputs, so secure configurations are the documented path.
- Examples cover hardened scenarios explicitly — private clusters, disabled public access, disabled local authentication, CMK encryption.
- Module code is checked with tfsec static analysis.
10Operational considerations
- Diagnostic settings are part of every module interface, so observability is configured at deployment time.
- Scenario examples double as documentation and as a fast way to validate a module change end to end.
- Versioned modules let landing zones upgrade on their own schedule.
11Results & impact
- Seven AVM-aligned modules covering container, AI and data services for landing-zone deployments.
- A consistent security interface across all modules, so one posture can be applied platform-wide.
- Scenario examples and changelogs that make modules self-documenting and safe to upgrade.
12Lessons learned
- A module’s interface is a security control — what is easy to set is what gets set.
- Wrapping a standard is more maintainable than forking it; the value is in the opinionated interface, not in copied code.
- Clear ownership boundaries between modules prevent duplicated resources and conflicting conventions.