Adding docs for data sources.

This commit is contained in:
Brad Sickles 2017-03-15 18:28:03 -04:00
parent aea87de808
commit c4206e4ef4
3 changed files with 117 additions and 0 deletions

View File

@ -0,0 +1,37 @@
---
layout: "dns"
page_title: "DNS: dns_a_record_set"
sidebar_current: "docs-dns-datasource-a-record-set"
description: |-
Get DNS A record set.
---
# dns\_a\_record\_set
Use this data source to get DNS A records of the host.
## Example Usage
```
data "dns_a_record_set" "google" {
host = "google.com"
}
output "google_addrs" {
value = "${join(",", data.dns_a_record_set.google.addrs)}"
}
```
## Argument Reference
The following arguments are supported:
* `host` - (required): Host to look up
## Attributes Reference
The following attributes are exported:
* `id` - Set to `host`.
* `addrs` - A list of IP addresses. IP addresses are always sorted to avoid constant changing plans.

View File

@ -0,0 +1,37 @@
---
layout: "dns"
page_title: "DNS: dns_cname_record_set"
sidebar_current: "docs-dns-datasource-cname-record-set"
description: |-
Get DNS CNAME record set.
---
# dns\_cname\_record\_set
Use this data source to get DNS CNAME record set of the host.
## Example Usage
```
data "dns_cname_record_set" "hashicorp" {
host = "www.hashicorp.com"
}
output "hashi_cname" {
value = "${data.dns_cname_record_set.hashi.cname}"
}
```
## Argument Reference
The following arguments are supported:
* `host` - (required): Host to look up
## Attributes Reference
The following attributes are exported:
* `id` - Set to `host`.
* `cname` - A CNAME record associated with host.

View File

@ -0,0 +1,43 @@
---
layout: "dns"
page_title: "DNS: dns_txt_record_set"
sidebar_current: "docs-dns-datasource-txt-record-set"
description: |-
Get DNS TXT record set.
---
# dns\_txt\_record\_set
Use this data source to get DNS TXT record set of the host.
## Example Usage
```
data "dns_txt_record_set" "hashicorp" {
host = "www.hashicorp.com"
}
output "hashi_txt" {
value = "${data.dns_txt_record_set.hashi.record}"
}
output "hashi_txts" {
value = "${join(",", data.dns_txt_record_set.hashi.records})"
}
```
## Argument Reference
The following arguments are supported:
* `host` - (required): Host to look up
## Attributes Reference
The following attributes are exported:
* `id` - Set to `host`.
* `record` - The first TXT record.
* `records` - A list of TXT records.