title: Google Cloud DNS changing Record Resource update time
body: <p>I am currently trying to map a Compute Engine VM with an ephemeral IP to a hostname using Google Cloud DNS, this operation takes place at the VM startup time. I am doing this through a shell script as it follows: </p>
  
  <pre><code>gcloud dns record-sets transaction start -z=MY_ZONE
  gcloud dns record-sets transaction remove --zone MY_ZONE \
      --name subd.domain.com \
      --type A "1.2.3.4" \ #the old external ip for the VM
      --ttl 300
  gcloud dns record-sets transaction add --zone MY_ZONE \
      --name subd.domain.com \
      --type A "5.6.7.8" \ #the new external ip for the VM
      --ttl 300
  gcloud dns record-sets transaction execute -z=MY_ZONE
  </code></pre>
  
  <p>After the script is run I can see the records successfully changed in the Cloud DNS UI, with the "A" RR having the new external IP.</p>
  
  <p>What happens now is that it takes a really long time for these changes to really go live. Accessing the hostname "subd.domain.com" after the change returns an "NXDOMAIN" status lasting a long period of time and only after that it finally maps the domain to the new IP.</p>
  
  <p>This situation raised two questions for me:</p>
  
  <p><strong>#1</strong> Why does the DNS go through the NXDOMAIN phase? Shouldn't those changes act as an <code>Update</code>(due to running this in a transaction) and not as a <code>Remove</code> then <code>Create.</code></p>
  
  <p><strong>#2</strong> What determines the time for this record update to go live?</p>