has anyone managed to create a Reverse DNS Zone on GCP -?

576 Views Asked by At

Just created a Reverse DNS Managed Zone as mentioned here - https://cloud.google.com/dns/docs/zones/managed-reverse-lookup-zones - How do we add VM IPs ? with Terraform - Since the Reverse DNS Zone adds Networks to it - Wondering How will add PTR records to the Zone?

1

There are 1 best solutions below

3
On

You cannot add records to a reverse lookup DNS zone directly; the data comes from the Compute Engine IP address data. Instead, add or modify the Access Configuration for the VM.

Note: You must first verify ownership of the domain. Ownership is verified in Webmaster Central.

To create a DNS PTR record for an existing Compute Engine VM instance, use the command flag --public-ptr.

Examples:

gcloud compute instances add-access-config [INSTANCE_NAME] \
    --public-ptr --public-ptr-domain [DOMAIN_NAME]

Use this command if the VM already has an access configuration:

gcloud compute instances update-access-config [INSTANCE_NAME] \
    --public-ptr --public-ptr-domain [DOMAIN_NAME]

Creating a PTR Record for a VM Instance