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.25.2 |
| FullName |
br:bicepacrdevwcom.azurecr.io/bicep/modules/dns/zones/cname:2026.8.25.2 |
| Last updated |
2026-08-25 09:43:58:+00:00 |
| Created |
2026-08-25 09:43:58:+00:00 |
| Digest |
sha256:584d626253c73f9d317c20869469aad5b2870e608ef5fefe06ee2faac388d7ba |
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.25.2' = {
name: 'cname${env}${version}'
params: {
name: name
dnsZoneName: dnsZoneName
cnameRecord: cnameRecord
}
}