{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/1122","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/1122/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/1122/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/1122/events","html_url":"https://github.com/hashicorp/terraform/issues/1122","id":59981455,"number":1122,"title":"aws/route53: Add support for updating records","user":{"login":"radeksimko","id":287584,"avatar_url":"https://avatars.githubusercontent.com/u/287584?v=3","gravatar_id":"","url":"https://api.github.com/users/radeksimko","html_url":"https://github.com/radeksimko","followers_url":"https://api.github.com/users/radeksimko/followers","following_url":"https://api.github.com/users/radeksimko/following{/other_user}","gists_url":"https://api.github.com/users/radeksimko/gists{/gist_id}","starred_url":"https://api.github.com/users/radeksimko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radeksimko/subscriptions","organizations_url":"https://api.github.com/users/radeksimko/orgs","repos_url":"https://api.github.com/users/radeksimko/repos","events_url":"https://api.github.com/users/radeksimko/events{/privacy}","received_events_url":"https://api.github.com/users/radeksimko/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/enhancement","name":"enhancement","color":"d4c5f9"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/aws","name":"provider/aws","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-05T17:01:39Z","updated_at":"2015-03-09T17:48:31Z","closed_at":null,"body":"[`aws_route53_record`](https://www.terraform.io/docs/providers/aws/r/route53_record.html) currently doesn't support update and simply tries to destroy & create all records per each `terraform apply` (= it doesn't even detect if there's any change):\r\n\r\n```\r\n$ terraform apply\r\n```\r\n```\r\naws_route53_zone.primary: Creating...\r\n  name:    \"\" => \"example.radeksimko.com\"\r\n  zone_id: \"\" => \"<computed>\"\r\naws_route53_zone.primary: Creation complete\r\naws_route53_record.sample: Creating...\r\n  name:               \"\" => \"sample\"\r\n  records.#:          \"\" => \"1\"\r\n  records.2740947585: \"\" => \"www.terraform.io\"\r\n  ttl:                \"\" => \"60\"\r\n  type:               \"\" => \"CNAME\"\r\n  zone_id:            \"\" => \"Z3CIJPRJAZMMDD\"\r\naws_route53_record.sample: Creation complete\r\n\r\nApply complete! Resources: 2 added, 0 changed, 0 destroyed.\r\n\r\nThe state of your infrastructure has been saved to the path\r\nbelow. This state is required to modify and destroy your\r\ninfrastructure, so keep it safe. To inspect the complete state\r\nuse the `terraform show` command.\r\n\r\nState path: terraform.tfstate\r\n\r\nOutputs:\r\n\r\n  hostname = sample.example.radeksimko.com\r\n```\r\n\r\n```\r\n$ terraform apply\r\n```\r\n```\r\naws_route53_zone.primary: Refreshing state... (ID: Z3CIJPRJAZMMDD)\r\naws_route53_record.sample: Refreshing state... (ID: Z3CIJPRJAZMMDD_sample.example.radeksimko.com_CNAME)\r\naws_route53_record.sample: Destroying...\r\naws_route53_record.sample: Destruction complete\r\naws_route53_record.sample: Creating...\r\n  name:               \"\" => \"sample\"\r\n  records.#:          \"\" => \"1\"\r\n  records.2740947585: \"\" => \"www.terraform.io\"\r\n  ttl:                \"\" => \"60\"\r\n  type:               \"\" => \"CNAME\"\r\n  zone_id:            \"\" => \"Z3CIJPRJAZMMDD\"\r\naws_route53_record.sample: Creation complete\r\n\r\nApply complete! Resources: 1 added, 0 changed, 1 destroyed.\r\n\r\nThe state of your infrastructure has been saved to the path\r\nbelow. This state is required to modify and destroy your\r\ninfrastructure, so keep it safe. To inspect the complete state\r\nuse the `terraform show` command.\r\n\r\nState path: terraform.tfstate\r\n\r\nOutputs:\r\n\r\n  hostname = sample.example.radeksimko.com\r\n```\r\n\r\nIt's worth mentioning that there are certain limits on the API:\r\nhttp://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html\r\n\r\n> Note the following limitations on a ChangeResourceRecordSets request:\r\n\r\n> - A request cannot contain more than 100 Change elements.\r\n> - A request cannot contain more than 1000 ResourceRecord elements.\r\n> - The sum of the number of characters (including spaces) in all Value elements in a request cannot exceed 32,000 characters.\r\n\r\nwhich we may not want to care about for the initial implementation, but should keep that in mind for the future and have some mechanisms how to get around that and eventually send more requests if required."},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/77905233","html_url":"https://github.com/hashicorp/terraform/issues/1122#issuecomment-77905233","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/1122","id":77905233,"user":{"login":"radeksimko","id":287584,"avatar_url":"https://avatars.githubusercontent.com/u/287584?v=3","gravatar_id":"","url":"https://api.github.com/users/radeksimko","html_url":"https://github.com/radeksimko","followers_url":"https://api.github.com/users/radeksimko/followers","following_url":"https://api.github.com/users/radeksimko/following{/other_user}","gists_url":"https://api.github.com/users/radeksimko/gists{/gist_id}","starred_url":"https://api.github.com/users/radeksimko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radeksimko/subscriptions","organizations_url":"https://api.github.com/users/radeksimko/orgs","repos_url":"https://api.github.com/users/radeksimko/repos","events_url":"https://api.github.com/users/radeksimko/events{/privacy}","received_events_url":"https://api.github.com/users/radeksimko/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T17:48:31Z","updated_at":"2015-03-09T17:48:31Z","body":"The _\"update all the time\"_ behaviour only happens when using the shorter syntax introduced in #312 or #969 respectively. It actually does work well with the \"verbose\" syntax (with FQDN):\r\n\r\n```ruby\r\nresource \"aws_route53_zone\" \"primary\" {\r\n   name = \"radeksimko.com\"\r\n}\r\n\r\nresource \"aws_route53_record\" \"sample\" {\r\n  zone_id = \"${aws_route53_zone.primary.id}\"\r\n  name = \"sample.${aws_route53_zone.primary.name}\"\r\n  type = \"CNAME\"\r\n  ttl = \"30\"\r\n  records = [\"www.terraform.io\"]\r\n}\r\n```\r\n"}}