| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** 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: "Certificate manager" |
| description: |- |
| DnsAuthorization represents a HTTP-reachable backend for a DnsAuthorization. |
| --- |
| |
| # google\_certificate\_manager\_dns\_authorization |
| |
| DnsAuthorization represents a HTTP-reachable backend for a DnsAuthorization. |
| |
| |
| |
| <div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=certificate_manager_dns_authorization_basic&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank"> |
| <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| </a> |
| </div> |
| ## Example Usage - Certificate Manager Dns Authorization Basic |
| |
| |
| ```hcl |
| resource "google_certificate_manager_dns_authorization" "default" { |
| name = "dns-auth" |
| description = "The default dnss" |
| domain = "subdomain.hashicorptest.com" |
| } |
| |
| output "record_name_to_insert" { |
| value = google_certificate_manager_dns_authorization.default.dns_resource_record.0.name |
| } |
| |
| output "record_type_to_insert" { |
| value = google_certificate_manager_dns_authorization.default.dns_resource_record.0.type |
| } |
| |
| output "record_data_to_insert" { |
| value = google_certificate_manager_dns_authorization.default.dns_resource_record.0.data |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| The following arguments are supported: |
| |
| |
| * `domain` - |
| (Required) |
| A domain which is being authorized. A DnsAuthorization resource covers a |
| single domain and its wildcard, e.g. authorization for "example.com" can |
| be used to issue certificates for "example.com" and "*.example.com". |
| |
| * `name` - |
| (Required) |
| Name of the resource; provided by the client when the resource is created. |
| The name must be 1-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, |
| and all following characters must be a dash, underscore, letter or digit. |
| |
| |
| - - - |
| |
| |
| * `description` - |
| (Optional) |
| A human-readable description of the resource. |
| |
| * `labels` - |
| (Optional) |
| Set of label tags associated with the DNS Authorization resource. |
| **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. |
| |
| * `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: |
| |
| * `id` - an identifier for the resource with format `projects/{{project}}/locations/global/dnsAuthorizations/{{name}}` |
| |
| * `dns_resource_record` - |
| The structure describing the DNS Resource Record that needs to be added |
| to DNS configuration for the authorization to be usable by |
| certificate. |
| Structure is [documented below](#nested_dns_resource_record). |
| |
| * `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. |
| |
| |
| <a name="nested_dns_resource_record"></a>The `dns_resource_record` block contains: |
| |
| * `name` - |
| (Output) |
| Fully qualified name of the DNS Resource Record. |
| E.g. `_acme-challenge.example.com`. |
| |
| * `type` - |
| (Output) |
| Type of the DNS Resource Record. |
| |
| * `data` - |
| (Output) |
| Data of the DNS Resource Record. |
| |
| ## 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 |
| |
| |
| DnsAuthorization can be imported using any of these accepted formats: |
| |
| * `projects/{{project}}/locations/global/dnsAuthorizations/{{name}}` |
| * `{{project}}/{{name}}` |
| * `{{name}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import DnsAuthorization using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "projects/{{project}}/locations/global/dnsAuthorizations/{{name}}" |
| to = google_certificate_manager_dns_authorization.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), DnsAuthorization can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_certificate_manager_dns_authorization.default projects/{{project}}/locations/global/dnsAuthorizations/{{name}} |
| $ terraform import google_certificate_manager_dns_authorization.default {{project}}/{{name}} |
| $ terraform import google_certificate_manager_dns_authorization.default {{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). |