Skip to content

googleCertificateManagerDnsAuthorization

DnsAuthorization represents a HTTP-reachable backend for a DnsAuthorization.

Example Usage - Certificate Manager Dns Authorization Basic

resource "google_certificate_manager_dns_authorization" "default" {
  name        = "dns-auth"
  description = "The default dnss"
  domain      = "%{random_suffix}.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.

  • 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}}

  • dnsResourceRecord - 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.

The dnsResourceRecord block contains:

  • name - (Output) Fully qualified name of the DNS Resource Record. E.g. acmeChallengeExampleCom.

  • type - (Output) Type of the DNS Resource Record.

  • data - (Output) Data of the DNS Resource Record.

Timeouts

This resource provides the following 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:

$ 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.