{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/44290","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/44290/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/44290/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/44290/events","html_url":"https://github.com/saltstack/salt/issues/44290","id":268528444,"number":44290,"title":"boto_secgroup.preset cannot create security group rule referencing a security group in another vpc","user":{"login":"mwerickso","id":18035436,"avatar_url":"https://avatars2.githubusercontent.com/u/18035436?v=4","gravatar_id":"","url":"https://api.github.com/users/mwerickso","html_url":"https://github.com/mwerickso","followers_url":"https://api.github.com/users/mwerickso/followers","following_url":"https://api.github.com/users/mwerickso/following{/other_user}","gists_url":"https://api.github.com/users/mwerickso/gists{/gist_id}","starred_url":"https://api.github.com/users/mwerickso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwerickso/subscriptions","organizations_url":"https://api.github.com/users/mwerickso/orgs","repos_url":"https://api.github.com/users/mwerickso/repos","events_url":"https://api.github.com/users/mwerickso/events{/privacy}","received_events_url":"https://api.github.com/users/mwerickso/received_events","type":"User","site_admin":false},"labels":[{"id":41387723,"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21","default":false},{"id":41388135,"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143","default":false},{"id":194766302,"url":"https://api.github.com/repos/saltstack/salt/labels/P3","name":"P3","color":"0a3d77","default":false},{"id":681621952,"url":"https://api.github.com/repos/saltstack/salt/labels/team-boto","name":"team-boto","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestone/13","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars0.githubusercontent.com/u/507599?v=4","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":3205,"closed_issues":5696,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2017-11-17T20:52:19Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2017-10-25T19:56:55Z","updated_at":"2017-11-17T20:56:15Z","closed_at":null,"author_association":"NONE","body":"### Description of Issue/Question\r\nI am trying to create a security group using the boto_secgroup state that allows inbound traffic from a security group in another VPC.\r\n\r\n### Setup\r\nI have the following debug state with source_group_group_id:\r\n```\r\nEnsure Security Group test exists:\r\n  boto_secgroup.present:\r\n    - name: test\r\n    - description: 'test'\r\n    - vpc_name: myNewVpc\r\n    - rules:\r\n      - ip_protocol: tcp\r\n        from_port: 80\r\n        to_port: 80\r\n        source_group_group_id:\r\n          - sg-d1dc17a\r\n    - region: us-east-1\r\n```\r\nor the following state with source_group_name:\r\n```\r\nEnsure Security Group test exists:\r\n  boto_secgroup.present:\r\n    - name: test\r\n    - description: 'test'\r\n    - vpc_name: myNewVpc\r\n    - rules:\r\n      - ip_protocol: tcp\r\n        from_port: 80\r\n        to_port: 80\r\n        source_group_name:\r\n          - myOtherSecurityGroup\r\n    - region: us-east-1\r\n```\r\nand I get the following error when running either one:\r\n```\r\n----------\r\n          ID: Ensure Security Group test exists\r\n    Function: boto_secgroup.present\r\n        Name: test\r\n      Result: False\r\n     Comment: Security group test created.  Failed to create rules on test security group.\r\n     Started: 19:43:43.679027\r\n    Duration: 1047.309 ms\r\n     Changes:   \r\n              ----------\r\n              new:\r\n                  ----------\r\n                  rules:\r\n                  secgroup:\r\n                      ----------\r\n                      description:\r\n                          test\r\n                      group_id:\r\n                          sg-6ce9af1e\r\n                      name:\r\n                          test\r\n                      owner_id:\r\n                          594080488221\r\n                      rules:\r\n                      rules_egress:\r\n                          |_\r\n                            ----------\r\n                            cidr_ip:\r\n                                0.0.0.0/0\r\n                            from_port:\r\n                                None\r\n                            ip_protocol:\r\n                                -1\r\n                            to_port:\r\n                                None\r\n              old:\r\n                  ----------\r\n                  rules:\r\n                  secgroup:\r\n                      None\r\n                  tags:\r\n                      ----------\r\n\r\nSummary for mySaltMaster\r\n------------\r\nSucceeded: 0 (changed=1)\r\nFailed:    1\r\n------------\r\n```\r\n\r\n### Steps to Reproduce Issue\r\nI am able to create security groups without issues when the referenced source_group_name is in the same VPC as the new security group. This issue is only when the source group is in a different VPC. I am not familiar with the code enough to know where to fix the assumption that the source group is in the same VPC (if that is the issue).\r\n\r\n### Versions Report\r\n```\r\nSalt Version:\r\n           Salt: 2017.7.2\r\n \r\nDependency Versions:\r\n           cffi: 1.5.2\r\n       cherrypy: 3.5.0\r\n       dateutil: 2.6.1\r\n      docker-py: Not Installed\r\n          gitdb: 0.6.4\r\n      gitpython: 1.0.1\r\n          ioflo: Not Installed\r\n         Jinja2: 2.8\r\n        libgit2: 0.24.0\r\n        libnacl: Not Installed\r\n       M2Crypto: Not Installed\r\n           Mako: 1.0.3\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.6\r\n   mysql-python: Not Installed\r\n      pycparser: 2.14\r\n       pycrypto: 2.6.1\r\n   pycryptodome: Not Installed\r\n         pygit2: 0.24.0\r\n         Python: 2.7.12 (default, Nov 19 2016, 06:48:10)\r\n   python-gnupg: Not Installed\r\n         PyYAML: 3.11\r\n          PyZMQ: 15.2.0\r\n           RAET: Not Installed\r\n          smmap: 0.9.0\r\n        timelib: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.1.4\r\n \r\nSystem Versions:\r\n           dist: Ubuntu 16.04 xenial\r\n         locale: UTF-8\r\n        machine: x86_64\r\n        release: 4.4.0-96-generic\r\n         system: Linux\r\n        version: Ubuntu 16.04 xenial\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/345363062","html_url":"https://github.com/saltstack/salt/issues/44290#issuecomment-345363062","issue_url":"https://api.github.com/repos/saltstack/salt/issues/44290","id":345363062,"user":{"login":"tkwilliams","id":6216055,"avatar_url":"https://avatars2.githubusercontent.com/u/6216055?v=4","gravatar_id":"","url":"https://api.github.com/users/tkwilliams","html_url":"https://github.com/tkwilliams","followers_url":"https://api.github.com/users/tkwilliams/followers","following_url":"https://api.github.com/users/tkwilliams/following{/other_user}","gists_url":"https://api.github.com/users/tkwilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/tkwilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkwilliams/subscriptions","organizations_url":"https://api.github.com/users/tkwilliams/orgs","repos_url":"https://api.github.com/users/tkwilliams/repos","events_url":"https://api.github.com/users/tkwilliams/events{/privacy}","received_events_url":"https://api.github.com/users/tkwilliams/received_events","type":"User","site_admin":false},"created_at":"2017-11-17T20:56:14Z","updated_at":"2017-11-17T20:56:14Z","author_association":"CONTRIBUTOR","body":"I guess we're leaving this open until @mwerickso  can verify it fixes his error?"}}
{"actor":{"display_login":"tkwilliams"}}