2026.8.31.6

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.8.31.6
FullName br:bicepacrdevwcom.azurecr.io/bicep/modules/dns/zones/cname:2026.8.31.6
Last updated 2026-08-31 10:48:39:+00:00
Created 2026-08-31 10:48:39:+00:00
Digest sha256:5becae2105aac4d124dc3ecfd3e947520dab3e092a380c813a531a29ef9c5933

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.8.31.6' = {
    name: 'cname${env}${version}'
    params: {
      name: name
      dnsZoneName: dnsZoneName
      cnameRecord: cnameRecord
    }
}