{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/10012","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/10012/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/10012/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/10012/events","html_url":"https://github.com/hashicorp/terraform/issues/10012","id":188456034,"number":10012,"title":"Suggestion: Destroy plans to show actual target object identities, not just TF naming","user":{"login":"stevehorsfield","id":5338720,"avatar_url":"https://avatars.githubusercontent.com/u/5338720?v=3","gravatar_id":"","url":"https://api.github.com/users/stevehorsfield","html_url":"https://github.com/stevehorsfield","followers_url":"https://api.github.com/users/stevehorsfield/followers","following_url":"https://api.github.com/users/stevehorsfield/following{/other_user}","gists_url":"https://api.github.com/users/stevehorsfield/gists{/gist_id}","starred_url":"https://api.github.com/users/stevehorsfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevehorsfield/subscriptions","organizations_url":"https://api.github.com/users/stevehorsfield/orgs","repos_url":"https://api.github.com/users/stevehorsfield/repos","events_url":"https://api.github.com/users/stevehorsfield/events{/privacy}","received_events_url":"https://api.github.com/users/stevehorsfield/received_events","type":"User","site_admin":false},"labels":[{"id":127939292,"url":"https://api.github.com/repos/hashicorp/terraform/labels/core","name":"core","color":"cccccc","default":false},{"id":85946959,"url":"https://api.github.com/repos/hashicorp/terraform/labels/enhancement","name":"enhancement","color":"d4c5f9","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-10T09:15:39Z","updated_at":"2016-11-10T16:00:35Z","closed_at":null,"body":"### Terraform Version\r\n0.6.16 (cannot upgrade because destroying based on existing TF code). No mention of improvement in CHANGELOG however.\r\n\r\n### Affected Resource(s)\r\n- All AWS resources, probably others as well\r\n\r\n### Suggestion\r\n\r\nI'm currently reviewing some destroy plans in Atlas for environments that share the same underlying AWS account. These environments differ only by variables and so the same logical names are present in the TF files but they create independent target objects, such as AWS IAM users, roles, S3 buckets, etc.\r\n\r\nWhen creating the destroy plan, I get output like (names adjusted):\r\n\r\n```\r\nPath: /terraform/terraform.tfplan\r\n\r\n- aws_iam_access_key.custom_user_access_key\r\n- aws_iam_role.custom_role\r\n- aws_iam_user.custom_user\r\n- aws_s3_bucket.bucket\r\n```\r\n\r\nIt would be ideal if we got output like:\r\n\r\n```\r\nPath: /terraform/terraform.tfplan\r\n\r\n- aws_iam_access_key.custom_user_access_key (arn:....:user/john, access_key_id: abcsdsd)\r\n- aws_iam_role.custom_role (arn:....:role/mkt)\r\n- aws_iam_user.custom_user (arn:....:user/john)\r\n- aws_s3_bucket.bucket (arn:...:bucket_john)\r\n```\r\n\r\nCurrently, I have to examine the raw state to ensure that the affected objects are the intended ones.\r\n\r\nThis would be a good improvement for all plans, not just destroy plans."},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/259728662","html_url":"https://github.com/hashicorp/terraform/issues/10012#issuecomment-259728662","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/10012","id":259728662,"user":{"login":"apparentlymart","id":20180,"avatar_url":"https://avatars.githubusercontent.com/u/20180?v=3","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":"2016-11-10T16:00:34Z","updated_at":"2016-11-10T16:00:34Z","body":"This is a nice idea, @stevehorsfield!\r\n\r\nGiven the limitations of Terraform's internal model I expect we wouldn't be able to get *exactly* the output you described, but we could do something where the value of the `id` attribute is shown; what exactly is stored in that attribute depends on the resource, but it's generally whatever we need to look up the object in the underlying API, which means it tends to be something humans can look up too.\r\n\r\nWe are already including this id in the log output for some operations, such as the \"refreshing state\" log lines, so seems like it should be pretty simple to include this same data in the plan output.\r\n"}}
{"actor":{"display_login":"apparentlymart"}}