W3cubDocs

/Terraform

telefonicaopencloud_dns_recordset_v2

Manages a DNS record set in the TelefonicaOpenCloud DNS Service.

Example Usage

Automatically detect the correct network

resource "telefonicaopencloud_dns_zone_v2" "example_zone" {
  name = "example.com."
  email = "[email protected]"
  description = "a zone"
  ttl = 6000
  type = "PRIMARY"
}

resource "telefonicaopencloud_dns_recordset_v2" "rs_example_com" {
  zone_id = "${telefonicaopencloud_dns_zone_v2.example_zone.id}"
  name = "rs.example.com."
  description = "An example record set"
  ttl = 3000
  type = "A"
  records = ["10.0.0.1"]
}

Argument Reference

The following arguments are supported:

  • region - (Optional) The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS record set.

  • zone_id - (Required) The ID of the zone in which to create the record set. Changing this creates a new DNS record set.

  • name - (Required) The name of the record set. Note the . at the end of the name. Changing this creates a new DNS record set.

  • type - (Optional) The type of record set. Examples: "A", "MX". Changing this creates a new DNS record set.

  • ttl - (Optional) The time to live (TTL) of the record set.

  • description - (Optional) A description of the record set.

  • records - (Optional) An array of DNS records.

  • value_specs - (Optional) Map of additional options. Changing this creates a new record set.

Attributes Reference

The following attributes are exported:

  • region - See Argument Reference above.
  • name - See Argument Reference above.
  • type - See Argument Reference above.
  • ttl - See Argument Reference above.
  • description - See Argument Reference above.
  • records - See Argument Reference above.
  • zone_id - See Argument Reference above.
  • value_specs - See Argument Reference above.

Import

This resource can be imported by specifying the zone ID and recordset ID, separated by a forward slash.

$ terraform import telefonicaopencloud_dns_recordset_v2.recordset_1 <zone_id>/<recordset_id>