{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-random/issues/18","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-random","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-random/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-random/issues/18/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-random/issues/18/events","html_url":"https://github.com/terraform-providers/terraform-provider-random/pull/18","id":292053711,"number":18,"title":"Hash ID for random_string resource","user":{"login":"Ginja","id":1631363,"avatar_url":"https://avatars3.githubusercontent.com/u/1631363?v=4","gravatar_id":"","url":"https://api.github.com/users/Ginja","html_url":"https://github.com/Ginja","followers_url":"https://api.github.com/users/Ginja/followers","following_url":"https://api.github.com/users/Ginja/following{/other_user}","gists_url":"https://api.github.com/users/Ginja/gists{/gist_id}","starred_url":"https://api.github.com/users/Ginja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ginja/subscriptions","organizations_url":"https://api.github.com/users/Ginja/orgs","repos_url":"https://api.github.com/users/Ginja/repos","events_url":"https://api.github.com/users/Ginja/events{/privacy}","received_events_url":"https://api.github.com/users/Ginja/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-01-26T22:42:10Z","updated_at":"2018-02-27T01:22:52Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-random/pulls/18","html_url":"https://github.com/terraform-providers/terraform-provider-random/pull/18","diff_url":"https://github.com/terraform-providers/terraform-provider-random/pull/18.diff","patch_url":"https://github.com/terraform-providers/terraform-provider-random/pull/18.patch"},"body":"Fixes #17\r\n\r\nUses bcrypt to hash the string before using it as the ID.\r\n\r\n```\r\n$ terraform plan\r\nRefreshing Terraform state in-memory prior to plan...\r\nThe refreshed state will be used to calculate this plan, but will not be\r\npersisted to local or remote state storage.\r\n\r\nThe Terraform execution plan has been generated and is shown below.\r\nResources are shown in alphabetical order for quick scanning. Green resources\r\nwill be created (or destroyed and then created if an existing resource\r\nexists), yellow resources are being changed in-place, and red resources\r\nwill be destroyed. Cyan entries are data sources to be read.\r\n\r\nNote: You didn't specify an \"-out\" parameter to save this plan, so when\r\n\"apply\" is called, Terraform can't guarantee this is what will execute.\r\n\r\n  + random_string.password\r\n      length:  \"16\"\r\n      lower:   \"true\"\r\n      number:  \"true\"\r\n      result:  \"<computed>\"\r\n      special: \"true\"\r\n      upper:   \"true\"\r\n\r\n\r\nPlan: 1 to add, 0 to change, 0 to destroy.\r\n\r\n\r\n$ terraform apply\r\nrandom_string.password: Creating...\r\n  length:  \"\" => \"16\"\r\n  lower:   \"\" => \"true\"\r\n  number:  \"\" => \"true\"\r\n  result:  \"\" => \"<computed>\"\r\n  special: \"\" => \"true\"\r\n  upper:   \"\" => \"true\"\r\nrandom_string.password: Creation complete (ID: $2a$14$o.3WxVmDDuvXxoY2qiFICOHFzZOnzP4KDHl8g9nYOUQOPjY7Sp9nq)\r\n\r\nApply complete! Resources: 1 added, 0 changed, 0 destroyed.\r\n\r\n\r\n$ terraform plan\r\nRefreshing Terraform state in-memory prior to plan...\r\nThe refreshed state will be used to calculate this plan, but will not be\r\npersisted to local or remote state storage.\r\n\r\nrandom_string.password: Refreshing state... (ID: $2a$14$o.3WxVmDDuvXxoY2qiFICOHFzZOnzP4KDHl8g9nYOUQOPjY7Sp9nq)\r\nNo changes. Infrastructure is up-to-date.\r\n\r\nThis means that Terraform did not detect any differences between your\r\nconfiguration and real physical resources that exist. As a result, Terraform\r\ndoesn't need to do anything.\r\n\r\n\r\n$ terraform apply\r\nrandom_string.password: Refreshing state... (ID: $2a$14$o.3WxVmDDuvXxoY2qiFICOHFzZOnzP4KDHl8g9nYOUQOPjY7Sp9nq)\r\n\r\nApply complete! Resources: 0 added, 0 changed, 0 destroyed.\r\n```"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-random/issues/comments/368712752","html_url":"https://github.com/terraform-providers/terraform-provider-random/pull/18#issuecomment-368712752","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-random/issues/18","id":368712752,"user":{"login":"apparentlymart","id":20180,"avatar_url":"https://avatars1.githubusercontent.com/u/20180?v=4","gravatar_id":"","url":"https://api.github.com/users/apparentlymart","html_url":"https://github.com/apparentlymart","followers_url":"https://api.github.com/users/apparentlymart/followers","following_url":"https://api.github.com/users/apparentlymart/following{/other_user}","gists_url":"https://api.github.com/users/apparentlymart/gists{/gist_id}","starred_url":"https://api.github.com/users/apparentlymart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apparentlymart/subscriptions","organizations_url":"https://api.github.com/users/apparentlymart/orgs","repos_url":"https://api.github.com/users/apparentlymart/repos","events_url":"https://api.github.com/users/apparentlymart/events{/privacy}","received_events_url":"https://api.github.com/users/apparentlymart/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T01:22:52Z","updated_at":"2018-02-27T01:22:52Z","author_association":"CONTRIBUTOR","body":"Hi @Ginja! Thanks for working on this, and sorry for the late response.\r\n\r\nLooking at this resource again, I realize that it doesn't actually use the saved id value at all, and so it really doesn't matter what is stored in here. I assume your goal here was to just avoid showing the generated random string in the log output, in which case maybe it'd be simpler to just set the id to a hard-coded value (like `d.SetId(\"none\")`) and then we'd avoid the complexity of including bcrypt and make the output simpler:\r\n\r\n```\r\nrandom_string.password: Refreshing state... (ID: none)\r\n```\r\n\r\nWhat do you think?\r\n\r\nI know it's been a while since you submitted this so if you no longer have time to work on this please let me know and I can work on a simplified version myself when I get some spare moments.\r\n"}}
{"actor":{"display_login":"apparentlymart"}}