Use this data source to access information about an existing DNS CNAME Record within Azure DNS.
data "azurerm_dns_cname_record" "example" {
name = "test"
zone_name = "test-zone"
resource_group_name = "test-rg"
}
output "dns_cname_record_id" {
value = data.azurerm_dns_cname_record.example.id
}
name
- The name of the DNS CNAME Record.
resource_group_name
- Specifies the resource group where the DNS Zone (parent resource) exists.
zone_name
- Specifies the DNS Zone where the resource exists.
id
- The DNS CName Record ID.
fqdn
- The FQDN of the DNS CName Record.
ttl
- The Time To Live (TTL) of the DNS record in seconds.
record
- The target of the CNAME.
target_resource_id
- The Azure resource id of the target object from where the dns resource value is taken.
tags
- A mapping of tags assigned to the resource.
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the DNS CNAME Record.