blob: 2be2efe5dff02b6ada1b7533d363b4a89aa58d10 [file] [log] [blame] [edit]
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
subcategory: "Cloud Domains"
description: |-
Registers a new domain name and creates a corresponding Registration resource.
---
# google_clouddomains_registration
Registers a new domain name and creates a corresponding Registration resource.
To get more information about Registration, see:
* [API documentation](https://cloud.google.com/domains/docs/reference/rest/v1/projects.locations.registrations)
* How-to Guides
* [Register a domain with Cloud Domains](https://cloud.google.com/domains/docs/buy-register-domain)
~> **Warning:** The Terraform implementation of this resource will not actually delete a Registration during
`terraform destroy`. Instead it will "abandon" the resource and remove it from state.
For information on deleting a registered domain, see https://cloud.google.com/domains/docs/delete-domain
## Example Usage - Clouddomains Registration Full
```hcl
resource "google_clouddomains_registration" my_registration {
domain_name = "example-domain.com"
location = "global"
labels = {
labelkey = "labelvalue"
}
yearly_price {
currency_code = "USD"
units = 12
}
dns_settings {
custom_dns {
name_servers = [
"ns-cloud-a1.googledomains.com.",
"ns-cloud-a2.googledomains.com.",
"ns-cloud-a3.googledomains.com.",
"ns-cloud-a4.googledomains.com."
]
}
}
contact_settings {
privacy = "REDACTED_CONTACT_DATA"
registrant_contact {
phone_number = "+12345000000"
email = "user@example.com"
postal_address {
region_code = "US"
postal_code = "95050"
administrative_area = "CA"
locality = "Example City"
address_lines = ["1234 Example street"]
recipients = ["example recipient"]
}
}
admin_contact {
phone_number = "+12345000000"
email = "user@example.com"
postal_address {
region_code = "US"
postal_code = "95050"
administrative_area = "CA"
locality = "Example City"
address_lines = ["1234 Example street"]
recipients = ["example recipient"]
}
}
technical_contact {
phone_number = "+12345000000"
email = "user@example.com"
postal_address {
region_code = "US"
postal_code = "95050"
administrative_area = "CA"
locality = "Example City"
address_lines = ["1234 Example street"]
recipients = ["example recipient"]
}
}
}
}
```
## Argument Reference
The following arguments are supported:
* `yearly_price` -
(Required)
Required. Yearly price to register or renew the domain. The value that should be put here can be obtained from
registrations.retrieveRegisterParameters or registrations.searchDomains calls.
Structure is [documented below](#nested_yearly_price).
* `contact_settings` -
(Required)
Required. Settings for contact information linked to the Registration.
Structure is [documented below](#nested_contact_settings).
* `location` -
(Required)
The location for the resource
* `domain_name` -
(Required)
Required. The domain name. Unicode domain names must be expressed in Punycode format.
<a name="nested_yearly_price"></a>The `yearly_price` block supports:
* `currency_code` -
(Optional)
The three-letter currency code defined in ISO 4217.
* `units` -
(Optional)
The whole units of the amount. For example if currencyCode is "USD", then 1 unit is one US dollar.
<a name="nested_contact_settings"></a>The `contact_settings` block supports:
* `privacy` -
(Required)
Required. Privacy setting for the contacts associated with the Registration.
Values are PUBLIC_CONTACT_DATA, PRIVATE_CONTACT_DATA, and REDACTED_CONTACT_DATA
* `registrant_contact` -
(Required)
Caution: Anyone with access to this email address, phone number, and/or postal address can take control of the domain.
Warning: For new Registrations, the registrant receives an email confirmation that they must complete within 15 days to
avoid domain suspension.
Structure is [documented below](#nested_registrant_contact).
* `admin_contact` -
(Required)
Caution: Anyone with access to this email address, phone number, and/or postal address can take control of the domain.
Warning: For new Registrations, the registrant receives an email confirmation that they must complete within 15 days to
avoid domain suspension.
Structure is [documented below](#nested_admin_contact).
* `technical_contact` -
(Required)
Caution: Anyone with access to this email address, phone number, and/or postal address can take control of the domain.
Warning: For new Registrations, the registrant receives an email confirmation that they must complete within 15 days to
avoid domain suspension.
Structure is [documented below](#nested_technical_contact).
<a name="nested_registrant_contact"></a>The `registrant_contact` block supports:
* `email` -
(Required)
Required. Email address of the contact.
* `phone_number` -
(Required)
Required. Phone number of the contact in international format. For example, "+1-800-555-0123".
* `fax_number` -
(Optional)
Fax number of the contact in international format. For example, "+1-800-555-0123".
* `postal_address` -
(Required)
Required. Postal address of the contact.
Structure is [documented below](#nested_postal_address).
<a name="nested_postal_address"></a>The `postal_address` block supports:
* `region_code` -
(Required)
Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to
ensure the value is correct. See https://cldr.unicode.org/ and
https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland.
* `postal_code` -
(Optional)
Postal code of the address. Not all countries use or require postal codes to be present, but where they are used,
they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).
* `administrative_area` -
(Optional)
Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state,
a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community
(e.g. "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland
this should be left unpopulated.
* `locality` -
(Optional)
Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world
where localities are not well defined or do not fit into this structure well, leave locality empty and use addressLines.
* `organization` -
(Optional)
The name of the organization at the address.
* `address_lines` -
(Optional)
Unstructured address lines describing the lower levels of an address.
Because values in addressLines do not have type information and may sometimes contain multiple values in a single
field (e.g. "Austin, TX"), it is important that the line order is clear. The order of address lines should be
"envelope order" for the country/region of the address. In places where this can vary (e.g. Japan), address_language
is used to make it explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for small-to-large). This way,
the most specific line of an address can be selected based on the language.
* `recipients` -
(Optional)
The recipient at the address. This field may, under certain circumstances, contain multiline information. For example,
it might contain "care of" information.
<a name="nested_admin_contact"></a>The `admin_contact` block supports:
* `email` -
(Required)
Required. Email address of the contact.
* `phone_number` -
(Required)
Required. Phone number of the contact in international format. For example, "+1-800-555-0123".
* `fax_number` -
(Optional)
Fax number of the contact in international format. For example, "+1-800-555-0123".
* `postal_address` -
(Required)
Required. Postal address of the contact.
Structure is [documented below](#nested_postal_address).
<a name="nested_postal_address"></a>The `postal_address` block supports:
* `region_code` -
(Required)
Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to
ensure the value is correct. See https://cldr.unicode.org/ and
https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland.
* `postal_code` -
(Optional)
Postal code of the address. Not all countries use or require postal codes to be present, but where they are used,
they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).
* `administrative_area` -
(Optional)
Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state,
a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community
(e.g. "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland
this should be left unpopulated.
* `locality` -
(Optional)
Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world
where localities are not well defined or do not fit into this structure well, leave locality empty and use addressLines.
* `organization` -
(Optional)
The name of the organization at the address.
* `address_lines` -
(Optional)
Unstructured address lines describing the lower levels of an address.
Because values in addressLines do not have type information and may sometimes contain multiple values in a single
field (e.g. "Austin, TX"), it is important that the line order is clear. The order of address lines should be
"envelope order" for the country/region of the address. In places where this can vary (e.g. Japan), address_language
is used to make it explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for small-to-large). This way,
the most specific line of an address can be selected based on the language.
* `recipients` -
(Optional)
The recipient at the address. This field may, under certain circumstances, contain multiline information. For example,
it might contain "care of" information.
<a name="nested_technical_contact"></a>The `technical_contact` block supports:
* `email` -
(Required)
Required. Email address of the contact.
* `phone_number` -
(Required)
Required. Phone number of the contact in international format. For example, "+1-800-555-0123".
* `fax_number` -
(Optional)
Fax number of the contact in international format. For example, "+1-800-555-0123".
* `postal_address` -
(Required)
Required. Postal address of the contact.
Structure is [documented below](#nested_postal_address).
<a name="nested_postal_address"></a>The `postal_address` block supports:
* `region_code` -
(Required)
Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to
ensure the value is correct. See https://cldr.unicode.org/ and
https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland.
* `postal_code` -
(Optional)
Postal code of the address. Not all countries use or require postal codes to be present, but where they are used,
they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).
* `administrative_area` -
(Optional)
Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state,
a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community
(e.g. "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland
this should be left unpopulated.
* `locality` -
(Optional)
Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world
where localities are not well defined or do not fit into this structure well, leave locality empty and use addressLines.
* `organization` -
(Optional)
The name of the organization at the address.
* `address_lines` -
(Optional)
Unstructured address lines describing the lower levels of an address.
Because values in addressLines do not have type information and may sometimes contain multiple values in a single
field (e.g. "Austin, TX"), it is important that the line order is clear. The order of address lines should be
"envelope order" for the country/region of the address. In places where this can vary (e.g. Japan), address_language
is used to make it explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for small-to-large). This way,
the most specific line of an address can be selected based on the language.
* `recipients` -
(Optional)
The recipient at the address. This field may, under certain circumstances, contain multiline information. For example,
it might contain "care of" information.
- - -
* `labels` -
(Optional)
Set of labels associated with the Registration.
**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field `effective_labels` for all of the labels present on the resource.
* `domain_notices` -
(Optional)
The list of domain notices that you acknowledge. Possible value is HSTS_PRELOADED
* `contact_notices` -
(Optional)
The list of contact notices that the caller acknowledges. Possible value is PUBLIC_CONTACT_DATA_ACKNOWLEDGEMENT
* `management_settings` -
(Optional)
Settings for management of the Registration, including renewal, billing, and transfer
Structure is [documented below](#nested_management_settings).
* `dns_settings` -
(Optional)
Settings controlling the DNS configuration of the Registration.
Structure is [documented below](#nested_dns_settings).
* `project` - (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
<a name="nested_management_settings"></a>The `management_settings` block supports:
* `renewal_method` -
(Output)
Output only. The actual renewal method for this Registration. When preferredRenewalMethod is set to AUTOMATIC_RENEWAL,
the actual renewalMethod can be equal to RENEWAL_DISABLED—for example, when there are problems with the billing account
or reported domain abuse. In such cases, check the issues field on the Registration. After the problem is resolved, the
renewalMethod is automatically updated to preferredRenewalMethod in a few hours.
* `preferred_renewal_method` -
(Optional)
The desired renewal method for this Registration. The actual renewalMethod is automatically updated to reflect this choice.
If unset or equal to RENEWAL_METHOD_UNSPECIFIED, the actual renewalMethod is treated as if it were set to AUTOMATIC_RENEWAL.
You cannot use RENEWAL_DISABLED during resource creation, and you can update the renewal status only when the Registration
resource has state ACTIVE or SUSPENDED.
When preferredRenewalMethod is set to AUTOMATIC_RENEWAL, the actual renewalMethod can be set to RENEWAL_DISABLED in case of
problems with the billing account or reported domain abuse. In such cases, check the issues field on the Registration. After
the problem is resolved, the renewalMethod is automatically updated to preferredRenewalMethod in a few hours.
* `transfer_lock_state` -
(Optional)
Controls whether the domain can be transferred to another registrar. Values are UNLOCKED or LOCKED.
<a name="nested_dns_settings"></a>The `dns_settings` block supports:
* `custom_dns` -
(Optional)
Configuration for an arbitrary DNS provider.
Structure is [documented below](#nested_custom_dns).
* `glue_records` -
(Optional)
The list of glue records for this Registration. Commonly empty.
Structure is [documented below](#nested_glue_records).
<a name="nested_custom_dns"></a>The `custom_dns` block supports:
* `name_servers` -
(Required)
Required. A list of name servers that store the DNS zone for this domain. Each name server is a domain
name, with Unicode domain names expressed in Punycode format.
* `ds_records` -
(Optional)
The list of DS records for this domain, which are used to enable DNSSEC. The domain's DNS provider can provide
the values to set here. If this field is empty, DNSSEC is disabled.
Structure is [documented below](#nested_ds_records).
<a name="nested_ds_records"></a>The `ds_records` block supports:
* `key_tag` -
(Optional)
The key tag of the record. Must be set in range 0 -- 65535.
* `algorithm` -
(Optional)
The algorithm used to generate the referenced DNSKEY.
* `digest_type` -
(Optional)
The hash function used to generate the digest of the referenced DNSKEY.
* `digest` -
(Optional)
The digest generated from the referenced DNSKEY.
<a name="nested_glue_records"></a>The `glue_records` block supports:
* `host_name` -
(Required)
Required. Domain name of the host in Punycode format.
* `ipv4_addresses` -
(Optional)
List of IPv4 addresses corresponding to this host in the standard decimal format (e.g. 198.51.100.1).
At least one of ipv4_address and ipv6_address must be set.
* `ipv6_addresses` -
(Optional)
List of IPv4 addresses corresponding to this host in the standard decimal format (e.g. 198.51.100.1).
At least one of ipv4_address and ipv6_address must be set.
## Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/registrations/{{domain_name}}`
* `name` -
Output only. Name of the Registration resource, in the format projects/*/locations/*/registrations/<domain_name>.
* `create_time` -
Output only. Time at which the automation was created.
* `expire_time` -
Output only. Time at which the automation was updated.
* `state` -
Output only. The current state of the Registration.
* `issues` -
Output only. The set of issues with the Registration that require attention.
* `supported_privacy` -
Output only. Set of options for the contactSettings.privacy field that this Registration supports.
* `register_failure_reason` -
Output only. The reason the domain registration failed. Only set for domains in REGISTRATION_FAILED state.
* `terraform_labels` -
The combination of labels configured directly on the resource
and default labels configured on the provider.
* `effective_labels` -
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 20 minutes.
- `update` - Default is 20 minutes.
- `delete` - Default is 20 minutes.
## Import
Registration can be imported using any of these accepted formats:
* `projects/{{project}}/locations/{{location}}/registrations/{{domain_name}}`
* `{{project}}/{{location}}/{{domain_name}}`
* `{{location}}/{{domain_name}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Registration using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}/locations/{{location}}/registrations/{{domain_name}}"
to = google_clouddomains_registration.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Registration can be imported using one of the formats above. For example:
```
$ terraform import google_clouddomains_registration.default projects/{{project}}/locations/{{location}}/registrations/{{domain_name}}
$ terraform import google_clouddomains_registration.default {{project}}/{{location}}/{{domain_name}}
$ terraform import google_clouddomains_registration.default {{location}}/{{domain_name}}
```
## User Project Overrides
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).