jpillora/grunt-aws — pull request #7 by bxjx (2013-12-20 06:15:46+00:00)
Title: Added Route53 record creation

Ok, here's a start on Route53 record creation. I'll push more to this branch in a bit, but thought I'd start a discussion. It definitely needs a new entry in the `README.md`.

Here's a sample config entry from my Gruntfile:

```
route53: {
options: {
region: 'ap-southeast-2',
accessKeyId: "<%= aws.accessKeyId %>",
secretAccessKey: "<%= aws.secretAccessKey %>",
zones: [{
id: 'XXXXXXXXXXXX',
records: [{
name: 'test-a-record.theglobalmail.org',
type: 'A',
TTL: 300,
value: ['1.1.1.1']
},{
name: 'test-record-pointing-to-a-bucket.theglobalmail.org',
type: 'CNAME',
TTL: 300,
value: [{ bucket: 'test-app.theglobalmail.org' }]
}]
}]
},
},
```
Few notes:
* it currently won't create a new zone - only records in a zone.
* it requires the `Host Zone ID` from Route53
* the `value: [{ bucket: 'test-app.theglobalmail.org' }]` will replace the value with a s3 hostname for the bucket based on the `region` e.g. `test-app.theglobalmail.org.s3-website-ap-southeast-2.amazonaws.com`.