IaC Bazaar
AzureLive-tested

MySQL Flexible Server

Azure Database for MySQL Flexible Server with TLS required by default, correct delegated-subnet + private DNS zone ordering, an Entra administrator, databases, and cheapest-by-default Burstable sizing.

terraformAzure#azure
azure-mysql-flexibleterraform 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 tests (mocked: validation rules · outputs)

Provenance

Functional

  • Live-tested - applied, verified, destroyed

Last verified 2026-08-04 · 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-mysql-flexible-1.0.0.sigstore.json \
  https://www.iac-bazaar.com/api/artifacts/azure-mysql-flexible/signature

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

# 4. (optional) confirm the checksum too
echo "3f99b765239c4c5bb1c1ec38e0941306e17b528d1e964348b474dac8ccca2003  azure-mysql-flexible-1.0.0.tar.gz" | sha256sum -c

Use it from the registry

terraform · opentofu
module "mysql_flexible" {
  source  = "www.iac-bazaar.com/iac-bazaar/azure-mysql-flexible/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 Premium, so its contract unlocks when you buy it.

Documentation

azure-mysql-flexible

Azure Database for MySQL Flexible Server with optional HA, private VNet delegation, Entra (Azure AD) administration, firewall rules, databases and tuned server parameters. Works with Terraform and OpenTofu (>= 1.6), azurerm provider >= 4.0, < 5.0.

What you get beyond azurerm_mysql_flexible_server alone:

  • TLS required by defaultrequire_secure_transport = ON is shipped as a managed server parameter so clients can't connect in the clear; override or extend via server_configurations
  • The delegated-subnet + private DNS zone link ordering handled correctly — the module creates the zone (<name>.private.mysql.database.azure.com), links it to your VNet, and forces the server to wait on the link (the classic mid-provisioning failure)
  • A single Entra (Azure AD) administrator wired to a user-assigned identity, with preconditions that catch invalid identity/CMK combinations at plan time
  • HA failovers won't cause perpetual diffs (zone / standby zone are ignored after create), and HA-on-Burstable is rejected at plan time
  • Cheapest-by-default sizing: Burstable B_Standard_B1ms, 20 GiB storage, no geo-redundant backup

Requirements

  • Terraform or OpenTofu >= 1.6
  • hashicorp/azurerm >= 4.0, < 5.0
  • For private networking the subnet must be delegated to Microsoft.DBforMySQL/flexibleServers and must not host other resource types.
  • HA is not available on Burstable (B_) SKUs; geo-redundant backup cannot be toggled after create.
  • CMK and the Entra administrator both require a user-assigned identity in identity_ids (MySQL Flexible Server supports UserAssigned identities only).

Security notes

  • Connections require TLS by default (require_secure_transport = ON). Removing it is possible via server_configurations but not recommended.
  • A public-access server is only reachable through explicit firewall_rules; with none set, no client can connect even though the endpoint is public. Prefer VNet delegation (network) for production.
  • The administrator password is sensitive and never printed in outputs.

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
  • Inputs
  • Outputs

Related modules