Skip to content

Instantly share code, notes, and snippets.

@jameswinegar
Last active January 2, 2019 00:50
Show Gist options
  • Save jameswinegar/7ec798e5ce3be8c0c9d238fd0f61c1f0 to your computer and use it in GitHub Desktop.
Save jameswinegar/7ec798e5ce3be8c0c9d238fd0f61c1f0 to your computer and use it in GitHub Desktop.
$managedZone = "example"
# We're making an assumption that I don't already have a TXT record with a label of our domain name.
# You can update this however you need it to be.
gcloud dns record-sets transaction start --zone $managedZone
gcloud dns record-sets transaction add --zone $managedZone `
--name $recordToAdd.Label `
--ttl $recordToAdd.Ttl `
--type TXT $recordToAdd.Text
gcloud dns record-sets transaction describe --zone $managedZone
gcloud dns record-sets transaction execute --zone $managedZone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment