IaC Bazaar
AzureLive-tested

Azure Private Endpoint (Private Link)

An Azure Private Endpoint giving a target PaaS resource a private IP inside your VNet so traffic stays on the Microsoft backbone - wire to existing subnet/target or run fully self-contained.

terraformAzure#azure
azure-private-endpointterraform v1.7

Verification

Live-tested

Really deployed to a cloud sandbox, verified against its outputs and assertions, then destroyed - with the teardown confirmed.

Conformance

  • Static validation (fmt · validate · tflint)
  • Security scan clean (Checkov)
  • Plan test superseded by live test

Provenance

Functional

  • Live-tested - applied, verified, destroyed

Last verified 2026-06-30 · how we verify

Verify this download

cosign · sha-256

Don't take our word for it. Every release is signed with cosign - check the bytes against our pinned public key before you trust them.

# 1. Our pinned public key - fetch once, trust out-of-band
curl -O https://www.iac-bazaar.com/cosign.pub

# 2. This module's Sigstore bundle
curl -o azure-private-endpoint-1.0.0.sigstore.json \
  https://www.iac-bazaar.com/api/artifacts/azure-private-endpoint/signature

# 3. Verify the tarball you downloaded
cosign verify-blob \
  --key cosign.pub \
  --bundle azure-private-endpoint-1.0.0.sigstore.json \
  azure-private-endpoint-1.0.0.tar.gz
# → Verified OK

# 4. (optional) confirm the checksum too
echo "626c330f2d4efab7f49314c5e8373b53a7f3a12d34b7b7711377418929c34ae1  azure-private-endpoint-1.0.0.tar.gz" | sha256sum -c

Use it from the registry

terraform · opentofu
module "private_endpoint" {
  source  = "www.iac-bazaar.com/iac-bazaar/azure-private-endpoint/azure"
  version = "1.0.0"
}

Paid module — needs a purchase (or a subscription that covers it) plus a registry token from /account/tokens. Full setup: registry docs.

Inputs & outputs

Create a free account to read this module's contract

The declared contract — every input name, type, default and description, plus every output — is shown to signed-in accounts, not to anonymous visitors.

A free account sees the contract of every Free module. This one is Basic, so its contract unlocks when you buy it.

Documentation

azure-private-endpoint

Status: static-validated, live-test pending. Ships under live-test quarantine until promoted by the Azure live lane. Schema is validated against the azurerm v4 provider docs.

An Azure Private Endpoint (Private Link) to a target PaaS resource — a Storage Account, Key Vault, Azure SQL, App Service, and so on. The endpoint gives the service a private IP inside your VNet so traffic stays on the Microsoft backbone and never traverses the public internet.

It works two ways:

  • Production wiring — point it at an existing subnet (subnet_id) and an existing target (target_resource_id).
  • Self-contained — set create_network = true to build a dedicated VNet + subnet, and/or create_demo_target = true to stand up a locked-down demo Storage Account target. With both on, one tofu apply yields a complete Private Link example (VNet + subnet + storage + endpoint), and tofu destroy removes it all.

Works with Terraform and OpenTofu (>= 1.6), azurerm provider >= 4.0, < 5.0, random >= 3.0, < 4.0.

What it provisions

  • azurerm_private_endpoint — the endpoint + its auto-created NIC, with a private_service_connection to the target's chosen subresource_names.
  • (optional, create_network) azurerm_virtual_network + azurerm_subnet (subnet has private_endpoint_network_policies = "Disabled").
  • (optional, create_demo_target) azurerm_storage_account — public access off, shared keys off, TLS 1.2+, infrastructure (double) encryption on, blob/container soft delete (7 days) on — named uniquely via random_string.
  • (optional, create_private_dns_zone) azurerm_private_dns_zone and, when a network is also created, an azurerm_private_dns_zone_virtual_network_link, with the endpoint's records registered automatically.

Security notes

  • The connection auto-approves for first-party (same-tenant) targets. Set is_manual_connection = true (+ request_message) only for cross-tenant / cross-subscription targets you do not own; the owner must approve.
  • The built-in demo target is secure by default: public network access off (reachable only through the endpoint), shared keys off (Entra-ID auth), TLS 1.2+, infrastructure (double) encryption on, and blob/container soft delete (7 days) on.
  • Module-created subnets disable private-endpoint network policies so the endpoint attaches; if you supply your own subnet_id, ensure the same on it.
  • Name resolution: attach a private DNS zone (private_dns_zone_ids or create_private_dns_zone) so clients resolve the service FQDN to the private IP; otherwise consume custom_dns_configs from the outputs.

Requirements

RequirementVersion
Terraform / OpenTofu>= 1.6
hashicorp/azurerm>= 4.0, < 5.0
hashicorp/random>= 3.0, < 4.0

Authenticate via az login (or a service principal) and set ARM_SUBSCRIPTION_ID. See docs/CONNECTING-PROVIDERS.md#azure.

License

Commercial — IaC Bazaar EULA. © IaC Bazaar. Original work (not derived from a third-party module).

Usage code & full reference unlock after purchase

The complete copy-paste usage, the full input/output reference, and operational notes ship with your licence - shown here and bundled in the download.

  • Usage — connect to an existing target
  • Usage — self-contained (own VNet + demo Storage target)
  • Common subresource (group ID) names
  • Inputs
  • Outputs

Related modules