github.com/atsaki/terraform@v0.4.3-0.20150919165407-25bba5967654/website/source/docs/providers/do/r/record.html.markdown (about)

     1  ---
     2  layout: "digitalocean"
     3  page_title: "DigitalOcean: digitalocean_record"
     4  sidebar_current: "docs-do-resource-record"
     5  description: |-
     6    Provides a DigitalOcean domain resource.
     7  ---
     8  
     9  # digitalocean\_record
    10  
    11  Provides a DigitalOcean domain resource.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  # Create a new domain record
    17  resource "digitalocean_domain" "default" {
    18      name = "www.example.com"
    19      ip_address = "${digitalocean_droplet.foo.ipv4_address}"
    20  }
    21  
    22  # Add a record to the domain
    23  resource "digitalocean_record" "foobar" {
    24      domain = "${digitalocean_domain.default.name}"
    25      type = "A"
    26      name = "foobar"
    27      value = "192.168.0.11"
    28  }
    29  ```
    30  
    31  ## Argument Reference
    32  
    33  The following arguments are supported:
    34  
    35  * `type` - (Required) The type of record
    36  * `domain` - (Required) The domain to add the record to
    37  * `value` - (Optional) The value of the record
    38  * `name` - (Optional) The name of the record
    39  * `weight` - (Optional) The weight of the record
    40  * `port` - (Optional) The port of the record
    41  * `priority` - (Optional) The priority of the record
    42  
    43  ## Attributes Reference
    44  
    45  The following attributes are exported:
    46  
    47  * `id` - The record ID
    48