{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4715","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4715/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4715/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4715/events","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/4715","id":328174089,"node_id":"MDU6SXNzdWUzMjgxNzQwODk=","number":4715,"title":"aws_ami doesn't ever return tags as output","user":{"login":"lc-nyovchev","id":1153009,"node_id":"MDQ6VXNlcjExNTMwMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/1153009?v=4","gravatar_id":"","url":"https://api.github.com/users/lc-nyovchev","html_url":"https://github.com/lc-nyovchev","followers_url":"https://api.github.com/users/lc-nyovchev/followers","following_url":"https://api.github.com/users/lc-nyovchev/following{/other_user}","gists_url":"https://api.github.com/users/lc-nyovchev/gists{/gist_id}","starred_url":"https://api.github.com/users/lc-nyovchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lc-nyovchev/subscriptions","organizations_url":"https://api.github.com/users/lc-nyovchev/orgs","repos_url":"https://api.github.com/users/lc-nyovchev/repos","events_url":"https://api.github.com/users/lc-nyovchev/events{/privacy}","received_events_url":"https://api.github.com/users/lc-nyovchev/received_events","type":"User","site_admin":false},"labels":[{"id":620316239,"node_id":"MDU6TGFiZWw2MjAzMTYyMzk=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/bug","name":"bug","color":"f7c6c7","default":true},{"id":794043766,"node_id":"MDU6TGFiZWw3OTQwNDM3NjY=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/labels/service/ec2","name":"service/ec2","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-31T14:57:10Z","updated_at":"2018-06-01T14:00:47Z","closed_at":null,"author_association":"NONE","body":"<!--- Please keep this note for the community --->\r\n\r\n### Community Note\r\n\r\n* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request\r\n* Please do not leave \"+1\" or \"me too\" comments, they generate extra noise for issue followers and do not help prioritize the request\r\n* If you are interested in working on this issue or have submitted a pull request, please leave a comment\r\n\r\n<!--- Thank you for keeping this note for the community --->\r\n\r\n### Terraform Version\r\n\r\nTerraform v0.11.7\r\nprovider.aws v1.21.0\r\n\r\n### Affected Resource(s)\r\n\r\n* aws_ami\r\n\r\n### Terraform Configuration Files\r\n\r\n```\r\nmain.tf\r\n\r\nprovider \"aws\" {\r\n  region = \"${var.dest_ami_region}\"\r\n}\r\n\r\ndata \"aws_ami\" \"ami_search\" {\r\n  most_recent = true\r\n  name_regex = \"mycompany-ubuntu-xenial-16.04-cassandra3-hvm-*\"\r\n  owners = [\"xyz\"]\r\n}\r\n\r\noutput.tf\r\n\r\noutput \"some\" {\r\n  value = \"${length(data.aws_ami.ami_search.tags)}\"\r\n}\r\n\r\n\r\n```\r\nany attempts to interpolate the tags:\r\n\r\n`value = \"${data.aws_ami.ami_search.tags.ASD}\" //where this is an existing tag`\r\n\r\n`value = \"${data.aws_ami.ami_search.tags[\"ASD\"]}\" //doesn't work either`\r\n\r\nfails\r\n\r\nThe ASD tag actually exists on the image.\r\n\r\n### Expected Behavior\r\n\r\nThe aws_ami task can actually get the tags that are defined on the ami\r\n\r\n### Actual Behavior\r\n\r\nThe tags are a zero length map\r\n\r\n### Steps to Reproduce\r\n\r\n<!--- Please list the steps required to reproduce the issue. --->\r\n\r\n1. `terraform apply`\r\n\r\n### Important Factoids\r\n\r\n- checked that the terraform user HAS the right to describe tags, as a matter of fact it has ec2.*\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/comments/393889714","html_url":"https://github.com/terraform-providers/terraform-provider-aws/issues/4715#issuecomment-393889714","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-aws/issues/4715","id":393889714,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Mzg4OTcxNA==","user":{"login":"blckct","id":12850030,"node_id":"MDQ6VXNlcjEyODUwMDMw","avatar_url":"https://avatars3.githubusercontent.com/u/12850030?v=4","gravatar_id":"","url":"https://api.github.com/users/blckct","html_url":"https://github.com/blckct","followers_url":"https://api.github.com/users/blckct/followers","following_url":"https://api.github.com/users/blckct/following{/other_user}","gists_url":"https://api.github.com/users/blckct/gists{/gist_id}","starred_url":"https://api.github.com/users/blckct/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blckct/subscriptions","organizations_url":"https://api.github.com/users/blckct/orgs","repos_url":"https://api.github.com/users/blckct/repos","events_url":"https://api.github.com/users/blckct/events{/privacy}","received_events_url":"https://api.github.com/users/blckct/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T14:00:47Z","updated_at":"2018-06-01T14:00:47Z","author_association":"NONE","body":"Have you tried `lookup(data.aws_ami.ami_search.tags, \"ASD\")`?"}}
{"actor":{"display_login":"blckct"}}