Google Cloud DNS Record Set

This page shows how to write Terraform for Cloud DNS Record Set and write them securely.

google_dns_record_set (Terraform)

The Record Set in Cloud DNS can be configured in Terraform with the resource name google_dns_record_set. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

  • id optionalcomputed - string
  • managed_zone required - string
    • Identifies the managed zone addressed by this request.

  • name required - string
  • project optionalcomputed - string
  • rrdatas optional - list / string
    • The string data for the records in this record set whose meaning depends on the DNS type. For TXT record, if the string data contains spaces, add surrounding " if you don't want your string to get split on spaces. To specify a single record value longer than 255 characters such as a TXT record for DKIM, add "" inside the Terraform configuration string (e.g. "first255characters""morecharacters").

  • ttl optional - number
    • Number of seconds that this ResourceRecordSet can be cached by resolvers.

  • type required - string
    • One of valid DNS resource types. Possible values: ["A", "AAAA", "CAA", "CNAME", "MX", "NAPTR", "NS", "PTR", "SOA", "SPF", "SRV", "TLSA", "TXT"]

Explanation in Terraform Registry

Manages a set of DNS records within Google Cloud DNS. For more information see the official documentation and API.

Note: The provider treats this resource as an authoritative record set. This means existing records (including the default records) for the given type will be overwritten when you create this resource in Terraform. In addition, the Google Cloud DNS API requires NS records to be present at all times, so Terraform will not actually remove NS records during destroy but will report that it did.

Frequently asked questions

What is Google Cloud DNS Record Set?

Google Cloud DNS Record Set is a resource for Cloud DNS of Google Cloud Platform. Settings can be wrote in Terraform.

security-icon

Scan your IaC problem in 3 minutes for free

You can keep your IaC security for free. No credit card required.