Skip to content

Commit 1956c13

Browse files
modular-magicianrileykarson
authored andcommitted
Add a documentation entry for CNAME records (hashicorp#123)
<!-- This change is generated by MagicModules. --> /cc @rileykarson
1 parent 008a505 commit 1956c13

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

website/docs/r/dns_record_set.markdown

+17
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,23 @@ resource "google_dns_managed_zone" "prod" {
117117
}
118118
```
119119

120+
### Adding a CNAME record
121+
The list of `rrdatas` should only contain a single string corresponding to the Canonical Name intended.
122+
```hcl
123+
resource "google_dns_record_set" "cname" {
124+
name = "frontend.${google_dns_managed_zone.prod.dns_name}"
125+
managed_zone = "${google_dns_managed_zone.prod.name}"
126+
type = "CNAME"
127+
ttl = 300
128+
rrdatas = ["frontend.mydomain.com."]
129+
}
130+
131+
resource "google_dns_managed_zone" "prod" {
132+
name = "prod-zone"
133+
dns_name = "prod.mydomain.com."
134+
}
135+
```
136+
120137
## Argument Reference
121138

122139
The following arguments are supported:

0 commit comments

Comments
 (0)