github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/ns1/r/record.html.markdown (about) 1 --- 2 layout: "ns1" 3 page_title: "NS1: ns1_record" 4 sidebar_current: "docs-ns1-resource-record" 5 description: |- 6 Provides a NS1 Record resource. 7 --- 8 9 # ns1\_record 10 11 Provides a NS1 Record resource. This can be used to create, modify, and delete records. 12 13 ## Example Usage 14 15 ```hcl 16 resource "ns1_zone" "tld" { 17 zone = "terraform.example" 18 } 19 20 resource "ns1_record" "www" { 21 zone = "${ns1_zone.tld.zone}" 22 domain = "www.${ns1_zone.tld.zone}" 23 type = "CNAME" 24 ttl = 60 25 26 answers = { 27 answer = "sub1.${ns1_zone.tld.zone}" 28 } 29 30 answers = { 31 answer = "sub2.${ns1_zone.tld.zone}" 32 } 33 34 filters = { 35 filter = "select_first_n" 36 37 config = { 38 N = 1 39 } 40 } 41 } 42 ``` 43 44 ## Argument Reference 45 46 The following arguments are supported: 47 48 * `zone` - (Required) The zone the record belongs to. 49 * `domain` - (Required) The records' domain. 50 * `type` - (Required) The records' RR type. 51 * `ttl` - (Optional) The records' time to live. 52 * `link` - (Optional) The target record to link to. This means this record is a 'linked' record, and it inherits all properties from its target. 53 * `use_client_subnet` - (Optional) Whether to use EDNS client subnet data when available(in filter chain). 54 * `answers` - (Optional) One or more NS1 answers for the records' specified type. Answers are documented below. 55 * `filters` - (Optional) One or more NS1 filters for the record(order matters). Filters are documented below. 56 57 Answers (`answers`) support the following: 58 59 * `answer` - (Required) Space delimited string of RDATA fields dependent on the record type. 60 61 A: 62 63 answer = "1.2.3.4" 64 65 CNAME: 66 67 answer = "www.example.com" 68 69 MX: 70 71 answer = "5 mail.example.com" 72 73 SRV: 74 75 answer = "10 0 2380 node-1.example.com" 76 77 SPF: 78 79 answer = "v=DKIM1; k=rsa; p=XXXXXXXX" 80 81 82 * `region` - (Optional) The region(or group) name that this answer belongs to. 83 84 Filters (`filters`) support the following: 85 86 * `filter` - (Required) The type of filter. 87 * `disabled` - (Optional) Determines whether the filter is applied in the filter chain. 88 * `config` - (Optional) The filters' configuration. Simple key/value pairs determined by the filter type.