Skip to content

Commit 13f8471

Browse files
authored
Add new data source: google_dns_managed_zone (hashicorp#268)
1 parent 735a868 commit 13f8471

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

docs/d/dns_managed_zone.html.markdown

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
layout: "google"
3+
page_title: "Google: google_dns_managed_zone"
4+
sidebar_current: "docs-google-datasource-dns-managed-zone"
5+
description: |-
6+
Provides access to the attributes of a zone within Google Cloud DNS
7+
---
8+
9+
# google\_dns\_managed\_zone
10+
11+
Provides access to a zone's attributes within Google Cloud DNS.
12+
For more information see
13+
[the official documentation](https://cloud.google.com/dns/zones/)
14+
and
15+
[API](https://cloud.google.com/dns/api/v1/managedZones).
16+
17+
```hcl
18+
data "google_dns_managed_zone" "env_dns_zone" {
19+
name = "qa-zone"
20+
}
21+
22+
resource "google_dns_record_set" "dns" {
23+
name = "my-address.${data.google_dns_managed_zone.env_dns_zone.dns_name}"
24+
type = "TXT"
25+
ttl = 300
26+
27+
managed_zone = "${data.google_dns_managed_zone.env_dns_zone.name}"
28+
29+
rrdatas = ["test"]
30+
}
31+
```
32+
33+
## Argument Reference
34+
35+
* `name` - (Required) A unique name for the resource.
36+
37+
* `project` - (Optional) ID of the project for the Google Cloud DNS zone.
38+
39+
## Attributes Reference
40+
41+
The following attributes are exported:
42+
43+
* `dns_name` - The DNS name of this zone, e.g. "terraform.io".
44+
45+
* `description` - A textual description field.
46+
47+
* `name_servers` - The list of nameservers that will be authoritative for this
48+
domain. Use NS records to redirect from your DNS provider to these names,
49+
thus making Google Cloud DNS authoritative for this zone.

docs/r/dns_managed_zone.markdown

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ description: |-
88

99
# google\_dns\_managed_zone
1010

11-
Manages a zone within Google Cloud DNS.
11+
Manages a zone within Google Cloud DNS. For more information see [the official documentation](https://cloud.google.com/dns/zones/) and
12+
[API](https://cloud.google.com/dns/api/v1/managedZones).
1213

1314
## Example Usage
1415

google.erb

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<li<%= sidebar_current("docs-google-datasource-container-versions") %>>
2626
<a href="/docs/providers/google/d/google_container_engine_versions.html">google_container_engine_versions</a>
2727
</li>
28+
<li<%= sidebar_current("docs-google-datasource-dns-managed-zone") %>>
29+
<a href="/docs/providers/google/d/dns_managed_zone.html">dns_managed_zone</a>
30+
</li>
2831
<li<%= sidebar_current("docs-google-datasource-iam-policy") %>>
2932
<a href="/docs/providers/google/d/google_iam_policy.html">google_iam_policy</a>
3033
</li>

0 commit comments

Comments
 (0)