Skip to content

Instantly share code, notes, and snippets.

@lukesmith
Created May 16, 2011 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukesmith/974384 to your computer and use it in GitHub Desktop.
Save lukesmith/974384 to your computer and use it in GitHub Desktop.
Ruby script to update a point dns record with the public ec2 instance ip address
require 'open-uri'
require 'point'
ip = open('http://169.254.169.254/latest/meta-data/public-ipv4').read
Point.username = "user@example.com"
Point.apitoken = "......"
zone = Point::Zone.find(<ZoneId>) # example.com
record = zone.record(<RecordId>) # teamcity.example.com
record.data = ip
record.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment