route53 - add or delete entries in Amazons Route53 DNS service

Author:Bruce Pennypacker

Synopsis

New in version 1.3.

Creates and deletes DNS records in Amazons Route53 service

Options

parameter required default choices comments
aws_access_key no
    AWS access key.
    aws_secret_key no
      AWS secret key.
      command yes
      • get
      • create
      • delete
      Specifies the action to take.
      overwrite no
        Whether an existing record should be overwritten on create if values do not match
        record yes
          The full DNS record to create or delete
          retry_interval no 500
            In the case that route53 is still servicing a prior request, this module will wait and try again after this many seconds. If you have many domain names, the default of 500 seconds may be too long.
            ttl no 3600 (one hour)
              The TTL to give the new record
              type yes
              • A
              • CNAME
              • MX
              • AAAA
              • TXT
              • PTR
              • SRV
              • SPF
              • NS
              The type of DNS record to create
              value no
                The new value when creating a DNS record. Multiple comma-spaced values are allowed. When deleting a record all values for the record must be specified or Route53 will not delete it.
                zone yes
                  The DNS zone to modify

                  Note

                  Requires boto

                  Examples


                  # Add new.foo.com as an A record with 3 IPs
                  - route53: >
                        command=create
                        zone=foo.com
                        record=new.foo.com
                        type=A
                        ttl=7200
                        value=1.1.1.1,2.2.2.2,3.3.3.3
                  
                  # Retrieve the details for new.foo.com
                  - route53: >
                        command=get
                        zone=foo.com
                        record=new.foo.com
                        type=A
                    register: rec
                  
                  # Delete new.foo.com A record using the results from the get command
                  - route53: >
                        command=delete
                        zone=foo.com
                        record={{ rec.set.record }}
                        type={{ rec.set.type }}
                        value={{ rec.set.value }}
                  
                  # Add an AAAA record.  Note that because there are colons in the value
                  # that the entire parameter list must be quoted:
                  - route53: >
                        command=create
                        zone=foo.com
                        record=localhost.foo.com
                        type=AAAA
                        ttl=7200
                        value="::1"
                  
                  # Add a TXT record. Note that TXT and SPF records must be surrounded
                  # by quotes when sent to Route 53:
                  - route53: >
                        command=create
                        zone=foo.com
                        record=localhost.foo.com
                        type=TXT
                        ttl=7200
                        value=""bar""