{"action":"opened","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/15432","repository_url":"https://api.github.com/repos/hashicorp/terraform","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/15432/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/15432/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/15432/events","html_url":"https://github.com/hashicorp/terraform/issues/15432","id":239488690,"number":15432,"title":"Looping AWS Resource and getting Outputs in maps","user":{"login":"urmail2ss","id":20009064,"avatar_url":"https://avatars2.githubusercontent.com/u/20009064?v=3","gravatar_id":"","url":"https://api.github.com/users/urmail2ss","html_url":"https://github.com/urmail2ss","followers_url":"https://api.github.com/users/urmail2ss/followers","following_url":"https://api.github.com/users/urmail2ss/following{/other_user}","gists_url":"https://api.github.com/users/urmail2ss/gists{/gist_id}","starred_url":"https://api.github.com/users/urmail2ss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urmail2ss/subscriptions","organizations_url":"https://api.github.com/users/urmail2ss/orgs","repos_url":"https://api.github.com/users/urmail2ss/repos","events_url":"https://api.github.com/users/urmail2ss/events{/privacy}","received_events_url":"https://api.github.com/users/urmail2ss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-29T13:59:08Z","updated_at":"2017-06-29T13:59:08Z","closed_at":null,"body":"Hi Guys,\r\nI am trying to create the aws resource in looping. I want know how to get the output of this resource in map. \r\n\r\nresource \"aws_s3_bucket\" \"app_buckets\" {\r\n  count  = \"${length(var.app_s3_buckets)}\"\r\n  bucket = \"${lookup(var.app_s3_buckets, element(keys(var.app_s3_buckets), count.index))}\"\r\n  acl    = \"private\"\r\n  tags {\r\n      Name = \"${lookup(var.app_s3_buckets, element(keys(var.app_s3_buckets), count.index))}\"\r\n      Environment = \"${var.env}\"\r\n  }\r\n}\r\n\r\nI am **looking of outputs like in below format**?  Can you please let me know is it doable or please let me know the alternate for same (other than hard code values). Reason for asking this I have depended resource needs to be create like IAM policies for all this buckets. \r\n\r\noutput \"s3_app_buckets_arn_map\" {\r\n  value = \"${\r\n    map(\r\n      aws_s3_bucket.app_buckets.*.id, aws_s3_bucket.app_buckets.*.arn\r\n    )\r\n    }\"\r\n}\r\n\r\n\r\nThanks,\r\nShan\r\n\r\n\r\n# PROVIDER ISSUES\r\n\r\n**PLEASE NOTE:** Terraform has split out the builtin Providers into their own repositories. For any Provider issues, please open all issues and pull requests in the corresponding repository. An index of supported Providers can be found here:\r\n\r\n- https://github.com/terraform-providers\r\n\r\nAll other issues (that appear to affect multiple or all providers) may be an issue with Terraform's core, and should be opened here. \r\n\r\n------\r\n\r\nHi there,\r\n\r\nThank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.\r\n\r\n### Terraform Version\r\nRun `terraform -v` to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.\r\n\r\n### Terraform Configuration Files\r\n```hcl\r\n# Copy-paste your Terraform configurations here - for large Terraform configs,\r\n# please use a service like Dropbox and share a link to the ZIP file. For\r\n# security, you can also encrypt the files using our GPG public key.\r\n```\r\n\r\n### Debug Output\r\nPlease provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.\r\n\r\n### Panic Output\r\nIf Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log`.\r\n\r\n### Expected Behavior\r\nWhat should have happened?\r\n\r\n### Actual Behavior\r\nWhat actually happened?\r\n\r\n### Steps to Reproduce\r\nPlease list the steps required to reproduce the issue, for example:\r\n1. `terraform apply`\r\n\r\n### Important Factoids\r\nAre there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?\r\n\r\n### References\r\nAre there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:\r\n- GH-1234\r\n"}}
{"actor":{"display_login":"urmail2ss"}}