{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/28469","labels_url":"https://api.github.com/repos/saltstack/salt/issues/28469/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/28469/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/28469/events","html_url":"https://github.com/saltstack/salt/issues/28469","id":114420178,"number":28469,"title":"state boto_secgroup.present fails to find vpc_name","user":{"login":"mlalpho","id":7646183,"avatar_url":"https://avatars.githubusercontent.com/u/7646183?v=3","gravatar_id":"","url":"https://api.github.com/users/mlalpho","html_url":"https://github.com/mlalpho","followers_url":"https://api.github.com/users/mlalpho/followers","following_url":"https://api.github.com/users/mlalpho/following{/other_user}","gists_url":"https://api.github.com/users/mlalpho/gists{/gist_id}","starred_url":"https://api.github.com/users/mlalpho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlalpho/subscriptions","organizations_url":"https://api.github.com/users/mlalpho/orgs","repos_url":"https://api.github.com/users/mlalpho/repos","events_url":"https://api.github.com/users/mlalpho/events{/privacy}","received_events_url":"https://api.github.com/users/mlalpho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-31T16:42:17Z","updated_at":"2015-11-02T14:51:54Z","closed_at":null,"body":"I'm getting a error when attempting to use the salt.boto_secgroup state to manage security groups. Am I doing something wrong? (some content redacted)\r\n\r\n```yaml\r\n----------\r\n          ID: create_sg\r\n    Function: boto_secgroup.present\r\n        Name: xxxxx\r\n      Result: False\r\n     Comment: Security group xxxxx created. xxxxx security group configuration could not be retrieved.\r\n     Started: 16:10:53.486125\r\n    Duration: 293.442 ms\r\n     Changes:\r\n              ----------\r\n              new:\r\n                  ----------\r\n                  secgroup:\r\n                      None\r\n              old:\r\n                  ----------\r\n                  secgroup:\r\n                      None\r\n    Warnings: 'vpc_name' is an invalid keyword argument for\r\n              'boto_secgroup.present'. If you were trying to pass additional\r\n              data to be used in a template context, please populate 'context'\r\n              with 'key: value' pairs. Your approach will work until Salt Carbon\r\n              is out. Please update your state files.\r\n```\r\n\r\n```sls\r\ncreate_sg:\r\n  boto_secgroup.present:\r\n    - name        : xxxxx\r\n    - description : descr\r\n    - vpc_name    : xxxvpc\r\n    - rules       :\r\n      - ip_protocol: all\r\n        from_port: -1\r\n        to_port: -1\r\n        cidr_ip:\r\n          - 0.0.0.0/0\r\n      - ip_protocol: icmp\r\n        from_port: -1\r\n        to_port: -1\r\n        source_group_name: xxx_sq\r\n    - rules_egress:\r\n      - ip_protocol: all\r\n        from_port: -1\r\n        to_port: -1\r\n        cidr_ip:\r\n          - 0.0.0.0/0\r\n    - region: us-west-2\r\n    - keyid: xxxxxxxxddddd\r\n    - key: xkcdxkcdxkcdxkcd\r\n```\r\n\r\n```sh\r\n# salt --versions-report\r\nSalt Version:\r\n           Salt: 2015.8.1\r\n\r\nDependency Versions:\r\n         Jinja2: 2.7.2\r\n       M2Crypto: 0.21.1\r\n           Mako: Not Installed\r\n         PyYAML: 3.11\r\n          PyZMQ: 14.7.0\r\n         Python: 2.7.5 (default, Jun 24 2015, 00:41:19)\r\n           RAET: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.0.5\r\n           cffi: Not Installed\r\n       cherrypy: Not Installed\r\n       dateutil: Not Installed\r\n          gitdb: Not Installed\r\n      gitpython: Not Installed\r\n          ioflo: Not Installed\r\n        libnacl: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.6\r\n   mysql-python: Not Installed\r\n      pycparser: Not Installed\r\n       pycrypto: 2.6.1\r\n         pygit2: Not Installed\r\n   python-gnupg: Not Installed\r\n          smmap: Not Installed\r\n        timelib: Not Installed\r\n\r\nSystem Versions:\r\n           dist: centos 7.1.1503 Core\r\n        machine: x86_64\r\n        release: 3.10.0-229.el7.x86_64\r\n         system: CentOS Linux 7.1.1503 Core\r\n```\r\n`Package python-boto-2.38.0-2.el7.noarch already installed and latest version\r\nNothing to do`\r\n\r\nChanging state to contain a 'context' dict that contains vpc_name also fails with a similar message.\r\n\r\nIf I change the state to to use the real vpc_id instead of vpc_name:\r\n```yaml\r\n----------\r\n          ID: create_sg\r\n    Function: boto_secgroup.present\r\n        Name: xxxxx\r\n      Result: True\r\n     Comment: Security group xxxxx created.  Created rules on xxxxx security group.\r\n     Started: 16:38:22.252943\r\n    Duration: 831.458 ms\r\n     Changes:\r\n              ----------\r\n              new:\r\n                  ----------\r\n                  rules:\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                      |_\r\n                        ----------\r\n                        from_port:\r\n                            -1\r\n                        ip_protocol:\r\n                            icmp\r\n                        source_group_group_id:\r\n                            sg-1241234\r\n                        source_group_owner_id:\r\n                            123542345\r\n                        to_port:\r\n                            -1\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                  secgroup:\r\n                      ----------\r\n                      description:\r\n                          descr\r\n                      group_id:\r\n                          sg-1241234\r\n                      name:\r\n                          xxxxx\r\n                      owner_id:\r\n                          123542345\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                  rules_egress:\r\n                      |_\r\n                        ----------\r\n                        cidr_ip:\r\n                            0.0.0.0/0\r\n                        from_port:\r\n                            -1\r\n                        ip_protocol:\r\n                            -1\r\n                        to_port:\r\n                            -1\r\n                  secgroup:\r\n                      None\r\n------------\r\nSucceeded: 1 (changed=1)\r\nFailed:    0\r\n------------\r\nTotal states run:     1\r\nTotal run time: 831.458 ms\r\n```\r\nSecond run:\r\n```yaml\r\n----------\r\n          ID: create_sg\r\n    Function: boto_secgroup.present\r\n        Name: xxxx\r\n      Result: True\r\n     Comment: Security group xxxxx present.\r\n     Started: 16:34:10.178922\r\n    Duration: 227.62 ms\r\n     Changes:\r\n```\r\n\r\nTo confirm, everything works as expected if i leave out vpc_name and define vpc_id. I would really like to see vpc_name working, however. Please advise. Thank You."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/153040658","html_url":"https://github.com/saltstack/salt/issues/28469#issuecomment-153040658","issue_url":"https://api.github.com/repos/saltstack/salt/issues/28469","id":153040658,"user":{"login":"rallytime","id":6547906,"avatar_url":"https://avatars.githubusercontent.com/u/6547906?v=3","gravatar_id":"","url":"https://api.github.com/users/rallytime","html_url":"https://github.com/rallytime","followers_url":"https://api.github.com/users/rallytime/followers","following_url":"https://api.github.com/users/rallytime/following{/other_user}","gists_url":"https://api.github.com/users/rallytime/gists{/gist_id}","starred_url":"https://api.github.com/users/rallytime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rallytime/subscriptions","organizations_url":"https://api.github.com/users/rallytime/orgs","repos_url":"https://api.github.com/users/rallytime/repos","events_url":"https://api.github.com/users/rallytime/events{/privacy}","received_events_url":"https://api.github.com/users/rallytime/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T14:51:54Z","updated_at":"2015-11-02T14:51:54Z","body":"@mlalpho Thank you for this excellent report. It looks like there is just a bug with using vpc_name and we'll fix it up. In the mean time, please use the vpc_id argument."}}