terraform-provider-google/website/docs/r/dns_managed_zone.html.markdown
The Magician ef5aa8eb2c Fixes non-symmetric backtick (#2724)
<!-- This change is generated by MagicModules. -->
/cc @Chupaka
2018-12-20 17:22:22 -08:00

3.5 KiB

layout page_title sidebar_current description
google Google: google_dns_managed_zone docs-google-dns-managed-zone A zone is a subtree of the DNS namespace under one administrative responsibility.

google_dns_managed_zone

A zone is a subtree of the DNS namespace under one administrative responsibility. A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service.

To get more information about ManagedZone, see:

## Example Usage - Dns Managed Zone Basic
resource "google_dns_managed_zone" "example-zone" {
  name = "example-zone"
  dns_name = "example-${random_id.rnd.hex}.com."
  description = "Example DNS zone"
  labels = {
    foo = "bar"
  }
}

resource "random_id" "rnd" {
  byte_length = 4
}

Argument Reference

The following arguments are supported:

  • dns_name - (Required) The DNS name of this managed zone, for instance "example.com.".

  • name - (Required) User assigned name for this resource. Must be unique within the project.


  • description - (Optional) A textual description field. Defaults to 'Managed by Terraform'.

  • labels - (Optional) A set of key/value label pairs to assign to this ManagedZone.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • name_servers - Delegate your managed_zone to these virtual name servers; defined by the server

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 4 minutes.
  • update - Default is 4 minutes.
  • delete - Default is 4 minutes.

Import

ManagedZone can be imported using any of these accepted formats:

$ terraform import google_dns_managed_zone.default projects/{{project}}/managedZones/{{name}}
$ terraform import google_dns_managed_zone.default {{project}}/{{name}}
$ terraform import google_dns_managed_zone.default {{name}}

-> If you're importing a resource with beta features, make sure to include -provider=google-beta as an argument so that Terraform uses the correct provider to import your resource.