google-cloud-platformvirtual-machinesubdomaingcloudclient-library

how to link google cloud virtual machine to a subdomain


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 ?


Solution

  • 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