{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3529","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3529/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3529/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3529/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/3529","id":150621478,"number":3529,"title":"ec2_group failings when using groups in other accounts","user":{"login":"roadrunner2","id":133040,"avatar_url":"https://avatars.githubusercontent.com/u/133040?v=3","gravatar_id":"","url":"https://api.github.com/users/roadrunner2","html_url":"https://github.com/roadrunner2","followers_url":"https://api.github.com/users/roadrunner2/followers","following_url":"https://api.github.com/users/roadrunner2/following{/other_user}","gists_url":"https://api.github.com/users/roadrunner2/gists{/gist_id}","starred_url":"https://api.github.com/users/roadrunner2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roadrunner2/subscriptions","organizations_url":"https://api.github.com/users/roadrunner2/orgs","repos_url":"https://api.github.com/users/roadrunner2/repos","events_url":"https://api.github.com/users/roadrunner2/events{/privacy}","received_events_url":"https://api.github.com/users/roadrunner2/received_events","type":"User","site_admin":false},"labels":[{"id":454885373,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/affects_2.3","name":"affects_2.3","color":"5319e7","default":false},{"id":382351767,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/aws","name":"aws","color":"c5def5","default":false},{"id":132571937,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":132897218,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/cloud","name":"cloud","color":"c7def8","default":false},{"id":414073372,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/waiting_on_maintainer","name":"waiting_on_maintainer","color":"d93f0b","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-04-24T03:39:42Z","updated_at":"2017-01-16T08:00:27Z","closed_at":"2017-01-16T08:00:27Z","body":"##### ISSUE TYPE\n- Bug Report\n##### COMPONENT NAME\n\nec2_group\n##### ANSIBLE VERSION\n\nCurrent head\n##### CONFIGURATION\n\nN/A\n##### OS / ENVIRONMENT\n\nN/A\n##### SUMMARY\n\nThe current handling of security groups in other accounts is broken in two ways:\n1. it requires knowing the group-id, not just the group-name\n2. it doesn't handle multiples groups with the same name but in different accounts\n##### STEPS TO REPRODUCE\n\nWe need to be able specify rules like this:\n\n```\n  rules:\n    - proto: tcp\n      from_port: 9999\n      to_port: 9999\n      group_name: \"{{ acct1 }}/group-foo\"\n    - proto: tcp\n      from_port: 9999\n      to_port: 9999\n      group_name: \"{{ acct2 }}/group-foo\"\n```\n\nFirst of all, requiring the group-id here is very painful when this is used to create security-groups in multple regions, because while the group name can be kept the same, the group-id's are different (since they are assigned by Amazon). We really want to be able to specify just the group name.\n\nSecond, the code currently stores entries in the `groups` dictionary based on name, which obviously fails in the above case where there are multiple groups in different accounts but with the same name. Instead, the entries need to be stored under keys like `<acct>/<group-name>` or similar.\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/272795565","html_url":"https://github.com/ansible/ansible-modules-core/issues/3529#issuecomment-272795565","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3529","id":272795565,"user":{"login":"roadrunner2","id":133040,"avatar_url":"https://avatars.githubusercontent.com/u/133040?v=3","gravatar_id":"","url":"https://api.github.com/users/roadrunner2","html_url":"https://github.com/roadrunner2","followers_url":"https://api.github.com/users/roadrunner2/followers","following_url":"https://api.github.com/users/roadrunner2/following{/other_user}","gists_url":"https://api.github.com/users/roadrunner2/gists{/gist_id}","starred_url":"https://api.github.com/users/roadrunner2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roadrunner2/subscriptions","organizations_url":"https://api.github.com/users/roadrunner2/orgs","repos_url":"https://api.github.com/users/roadrunner2/repos","events_url":"https://api.github.com/users/roadrunner2/events{/privacy}","received_events_url":"https://api.github.com/users/roadrunner2/received_events","type":"User","site_admin":false},"created_at":"2017-01-16T08:00:27Z","updated_at":"2017-01-16T08:00:27Z","body":"Re-reported as ansible/ansible#20286."}}
{"actor":{"display_login":"roadrunner2"}}