mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-15 07:27:15 +00:00
0b8c9644d7
Importing google_dns_managed_zone with project
64 lines
1.8 KiB
Markdown
64 lines
1.8 KiB
Markdown
---
|
|
layout: "google"
|
|
page_title: "Google: google_dns_managed_zone"
|
|
sidebar_current: "docs-google-dns-managed-zone"
|
|
description: |-
|
|
Manages a zone within Google Cloud DNS.
|
|
---
|
|
|
|
# google\_dns\_managed_zone
|
|
|
|
Manages a zone within Google Cloud DNS. For more information see [the official documentation](https://cloud.google.com/dns/zones/) and
|
|
[API](https://cloud.google.com/dns/api/v1/managedZones).
|
|
|
|
## Example Usage
|
|
|
|
```hcl
|
|
resource "google_dns_managed_zone" "prod" {
|
|
name = "prod-zone"
|
|
dns_name = "prod.mydomain.com."
|
|
description = "Production DNS zone"
|
|
|
|
labels = {
|
|
foo = "bar"
|
|
}
|
|
}
|
|
```
|
|
|
|
## Argument Reference
|
|
|
|
The following arguments are supported:
|
|
|
|
* `dns_name` - (Required) The fully qualified DNS name of this zone, e.g. `terraform.io.`.
|
|
|
|
* `name` - (Required) A unique name for the resource, required by GCE.
|
|
Changing this forces a new resource to be created.
|
|
|
|
- - -
|
|
|
|
* `description` - (Optional) A textual description field. Defaults to 'Managed by Terraform'.
|
|
|
|
* `project` - (Optional) The ID of the project in which the resource belongs. If it
|
|
is not provided, the provider project is used.
|
|
|
|
* `labels` - (Optional) A set of key/value label pairs to assign to the instance.
|
|
|
|
## Attributes Reference
|
|
|
|
In addition to the arguments listed above, the following computed attributes are
|
|
exported:
|
|
|
|
* `name_servers` - The list of nameservers that will be authoritative for this
|
|
domain. Use NS records to redirect from your DNS provider to these names,
|
|
thus making Google Cloud DNS authoritative for this zone.
|
|
|
|
## Import
|
|
|
|
Managed zones can be imported using any of these accepted formats:
|
|
|
|
```
|
|
$ terraform import google_dns_managed_zone.prod projects/{{project-id}}/managedZones/{{zone}}
|
|
$ terraform import google_compute_disk.default {{project-id}}/managedZones/{{zone}}
|
|
$ terraform import google_compute_disk.default {{zone}}
|
|
```
|