how to link google cloud virtual machine to a subdomain

1.1k Views Asked by At

I have a cloud virtual instance with a physical address say 244.168.0.221 . I also have a domain abc.com in google domains. how to connect this IP to subdomain "first.abc.com" using google API client library ( node-JS client library ).ie How to create a A record using google node-JS Client library ?

3

There are 3 best solutions below

0
SHARON XAVIER On BEST ANSWER

You can do it using google cloud domains Steps to follow

  1. Transfer your domain registration to google cloud domain. transfer
  2. Create zone in cloud DNS create zone
  3. Create A record pointing to the physical address of GCP virtual machine in the zone create a "A" record

Now follow this sample, cloud DNS NodeJS Client library nodejs client

1
guillaume blaquiere On

Create a A record in your registrar that link your (sub)domains to your IP.

0
John Hanley On

Google Domains does not provide a public API to create DNS Resource Records.