2026.9.9.2

Overview

Creates or updates a CNAME (Canonical Name) record in an Azure DNS zone. CNAME records are used to map a domain or subdomain to another domain name.

Name cname
Tag 2026.9.9.2
FullName br:bicepacrdevwcom.azurecr.io/bicep/modules/dns/zones/cname:2026.9.9.2
Last updated 2026-09-09 12:45:56:+00:00
Created 2026-09-09 12:45:56:+00:00
Digest sha256:eb92971eef09777b93bd9a5575d5958ea509199fbd38d89ad4a520d413c311bc

Parameters

Name Type Required Description
name string Yes The name of the CNAME record set to create or update (e.g., "alias" for alias.domain.com).
dnsZoneName string Yes The name of the existing DNS zone where the CNAME record will be created.
cnameRecord string Yes The canonical name to which this CNAME record will point (e.g., "target.domain.com.").
ttl int No
300
The time-to-live (TTL) value for the CNAME record set, in seconds. Defaults to 300 seconds (5 minutes).

Outputs

Name Type Description
fqdn string The Fully Qualified Domain Name (FQDN) of the CNAME record, excluding the trailing dot if present.

Example

@description('The target environment.')
param env string

@description('The deployment version.')
param version string = '1.0.0.0'

@description('The name of the CNAME record set to create or update (e.g., "alias" for alias.domain.com).')
param name string

@description('The name of the existing DNS zone where the CNAME record will be created.')
param dnsZoneName string

@description('The canonical name to which this CNAME record will point (e.g., "target.domain.com.").')
param cnameRecord string


module cname 'br:bicepacrdevwcom.azurecr.io/bicep/modules/dns/zones/cname:2026.9.9.2' = {
    name: 'cname${env}${version}'
    params: {
      name: name
      dnsZoneName: dnsZoneName
      cnameRecord: cnameRecord
    }
}