github.com/simonswine/terraform@v0.9.0-beta2/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  ```
    16  resource "ns1_zone" "tld" {
    17    zone = "terraform.example"
    18  }
    19  
    20  resource "ns1_record" "www" {
    21    zone   = "${ns1_zone.tld.id}"
    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    answer = {
    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) The list of the RDATA fields for the records' specified type. Answers are documented below.
    55  * `filters` - (Optional) The list of NS1 filters for the record(order matters). Filters are documented below.
    56  
    57  Answers (`answers`) support the following:
    58  
    59  * `answer` - (Required) List of RDATA fields.
    60  * `region` - (Required) The region this answer belongs to.
    61  
    62  Filters (`filters`) support the following:
    63  
    64  * `filter` - (Required) The type of filter.
    65  * `disabled` - (Required) Determines whether the filter is applied in the filter chain.
    66  * `config` - (Required) The filters' configuration. Simple key/value pairs determined by the filter type.