Commit Graph

3 Commits

Author SHA1 Message Date
James Nugent f76c1ec921 provider/aws: Fix aws_route53_record 0-2 migration (#7907)
When migrating the state of an `aws_route53_record`, a v0 state was
never upgraded to v2, and a typo in a unit test masked this. This commit
fixes the migration by chaining the invocation of the migration
function, and corrects the test.
2016-08-02 09:54:17 +10:00
Adam Mielke 97fbeaf59f add support for geolocation and latency records to aws route53 provider 2016-05-31 15:11:02 -05:00
clint shryock 42ee519a31 provider/aws: Update Route53 Record to schema v1, normalizing name
The `name` attribute will always be normalized to a FQDN, with a trailing "dot"
at the end when returned from the API.

We store the name as it's provided in the configuration, so "www" stays as "www"
and "www.terraformtesting.io." stays as "www.terraformtesting.io.".

The problem here is that if we use a full name as above, and the configuraiton
does *not* include the trailing dot, the API will return a version that does,
and we'll have a conflict.

This is particularly bad when we have a lifecycle block with
`create_before_destroy`; the record will get an update posted (which ends up
being a no-op on AWS's side), but then we'll delete the same record immediately
after, resulting in no record at all.

This PR addresses that by trimming the trailing dot from the `name` when saving
to state. We migrate existing state to match, to avoid false-positive diffs.
2016-05-10 11:17:02 -05:00