====== GCP Cloud Compute ====== ===== Cloud DNS ===== ==== Web way ==== Select "Cloud DNS" from menu on LHS. Add domain (yourdomain.com) which shows up resource records for NameServers. These need using on the DNS name registrar's website. Add new A record, same way in principe as any other dns, just googlified. Test External access:- [root@helium scripts]# nslookup test1.yourdomain.com ns-cloud-d1.googledomains.com Server: ns-cloud-d1.googledomains.com Address: 216.239.32.109#53 Name: test1.yourdomain.com Address: 10.10.10.10 In this case, the address was set to 10.10.10.10 just for a test URL. ==== CLI way ==== [me@eb8470w ~]$ gcloud dns record-sets -z=yourdomain-com transaction start Transaction started [transaction.yaml]. [me@eb8470w ~]$ [me@eb8470w ~]$ [me@eb8470w ~]$ gcloud dns --project yourdomain-production record-sets transaction add --zone="yourdomain-com" --name="test1.sub.yourdomain.com." --ttl=21600 --type=A "1.2.3.4" Record addition appended to transaction at [transaction.yaml]. [me@eb8470w ~]$ gcloud dns record-sets -z=yourdomain-com transaction describe additions: - kind: dns#resourceRecordSet name: yourdomain.com. rrdatas: - ns-cloud-d1.googledomains.com. dns-admin.google.com. 1 21600 3600 1209600 300 ttl: 21600 type: SOA - kind: dns#resourceRecordSet name: test1.sub.yourdomain.com. rrdatas: - 1.2.3.4 ttl: 21600 type: A deletions: - kind: dns#resourceRecordSet name: yourdomain.com. rrdatas: - ns-cloud-d1.googledomains.com. dns-admin.google.com. 0 21600 3600 1209600 300 ttl: 21600 type: SOA [astringer@eb8470w ~]$ gcloud dns record-sets -z=yourdomain-com transaction execute Executed transaction [transaction.yaml] for managed-zone [yourdomain-com]. Created [https://www.googleapis.com/dns/v1/projects/yourdomain-production/managedZones/yourdomain-com/changes/4]. ID START_TIME STATUS 4 2015-11-02T16:24:08.502Z pending [me@eb8470w ~]$ This page has been accessed for:- \\ Today: {{counter|today}} \\ Yesterday: {{counter|yesterday}} \\ Until now: {{counter|total}} \\