{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/8143","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/8143/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/8143/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/8143/events","html_url":"https://github.com/hashicorp/terraform/issues/8143","id":170705712,"number":8143,"title":"core: names produced via name_prefix should start with a timestamp","user":{"login":"glasser","id":16724,"avatar_url":"https://avatars.githubusercontent.com/u/16724?v=3","gravatar_id":"","url":"https://api.github.com/users/glasser","html_url":"https://github.com/glasser","followers_url":"https://api.github.com/users/glasser/followers","following_url":"https://api.github.com/users/glasser/following{/other_user}","gists_url":"https://api.github.com/users/glasser/gists{/gist_id}","starred_url":"https://api.github.com/users/glasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasser/subscriptions","organizations_url":"https://api.github.com/users/glasser/orgs","repos_url":"https://api.github.com/users/glasser/repos","events_url":"https://api.github.com/users/glasser/events{/privacy}","received_events_url":"https://api.github.com/users/glasser/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/core","name":"core","color":"cccccc"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/enhancement","name":"enhancement","color":"d4c5f9"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-11T17:52:45Z","updated_at":"2016-08-17T02:44:50Z","closed_at":null,"body":"This looks similar to #494 but is not the same.\r\n\r\nMany resources have a `name_prefix` attribute which uses `resource.PrefixedUniqueId` to generate random names for their resources.  This function adds 26 random base32 characters after the prefix.\r\n\r\nThis works really well. But because the varying part is truly random, it's difficult (when, eg, looking at a list of ASGs in the EC2 console) to know which one is the \"new one\" and which one is the \"old one\".\r\n\r\nI propose that the varying string returned by `resource.PrefixedUniqueId` should begin with a UTC timestamp like 20160811105022 before a shorter random portion.  This is only calculated when a new ID is required (it doesn't present ignore_changes issues like in #494).  This should ensure that in most practical situations, you can tell which resource is \"new\" vs \"old\" just by sorting their names.\r\n\r\nI don't think there's real backwards compatibility concerns here, as long as the lengths are the same. I assume that the names generated here are rarely shown to end users of your infrastructure so it's unlikely to reveal secrets.\r\n\r\nHappy to send a PR for this if it would be accepted."},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/240299156","html_url":"https://github.com/hashicorp/terraform/issues/8143#issuecomment-240299156","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/8143","id":240299156,"user":{"login":"glasser","id":16724,"avatar_url":"https://avatars.githubusercontent.com/u/16724?v=3","gravatar_id":"","url":"https://api.github.com/users/glasser","html_url":"https://github.com/glasser","followers_url":"https://api.github.com/users/glasser/followers","following_url":"https://api.github.com/users/glasser/following{/other_user}","gists_url":"https://api.github.com/users/glasser/gists{/gist_id}","starred_url":"https://api.github.com/users/glasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasser/subscriptions","organizations_url":"https://api.github.com/users/glasser/orgs","repos_url":"https://api.github.com/users/glasser/repos","events_url":"https://api.github.com/users/glasser/events{/privacy}","received_events_url":"https://api.github.com/users/glasser/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T02:44:50Z","updated_at":"2016-08-17T02:44:50Z","body":"@mitchellh Done, https://github.com/hashicorp/terraform/pull/8249."}}
{"actor":{"display_login":"glasser"}}