{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/27183","labels_url":"https://api.github.com/repos/saltstack/salt/issues/27183/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/27183/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/27183/events","html_url":"https://github.com/saltstack/salt/issues/27183","id":106954695,"number":27183,"title":"Error creating ELB with boto_elb.present, Security Group Name not transformed to ID","user":{"login":"samhamilton","id":415410,"avatar_url":"https://avatars.githubusercontent.com/u/415410?v=3","gravatar_id":"","url":"https://api.github.com/users/samhamilton","html_url":"https://github.com/samhamilton","followers_url":"https://api.github.com/users/samhamilton/followers","following_url":"https://api.github.com/users/samhamilton/following{/other_user}","gists_url":"https://api.github.com/users/samhamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/samhamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samhamilton/subscriptions","organizations_url":"https://api.github.com/users/samhamilton/orgs","repos_url":"https://api.github.com/users/samhamilton/repos","events_url":"https://api.github.com/users/samhamilton/events{/privacy}","received_events_url":"https://api.github.com/users/samhamilton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P4","name":"P4","color":"031a39"},{"url":"https://api.github.com/repos/saltstack/salt/labels/RIoT","name":"RIoT","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/State%20Module","name":"State Module","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","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://avatars.githubusercontent.com/u/507599?v=3","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":2545,"closed_issues":2610,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-09-18T22:28:29Z","due_on":null,"closed_at":null},"comments":17,"created_at":"2015-09-17T10:18:47Z","updated_at":"2015-09-19T05:53:01Z","closed_at":null,"body":"I am getting the following error\r\n\r\n```yaml\r\n----------\r\n          ID: hezum-java-eb\r\n    Function: boto_elb.present\r\n        Name: hezum-java-lb\r\n      Result: False\r\n     Comment: Failed to create hezum-java-lb ELB.\r\n     Started: 10:12:39.017980\r\n    Duration: 905.441 ms\r\n     Changes:\r\n```\r\n\r\n```xml\r\n2015-09-17 10:12:39,921 [salt.loaded.int.module.boto_elb][ERROR   ][15001] Failed to create ELB hezum-java-lb: BotoServerError: 400 Bad Request\r\n<ErrorResponse xmlns=\"http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/\">\r\n  <Error>\r\n    <Type>Sender</Type>\r\n    <Code>InvalidSecurityGroup</Code>\r\n    <Message>Invalid id: &quot;hezum-java-lb&quot; (expecting &quot;sg-...&quot;) (Service: AmazonEC2; Status Code: 400; Error Code: InvalidGroupId.Malformed; Request ID: 3b84f760-ffbf-455f-99e0-e79de472799d)</Message>\r\n  </Error>\r\n  <RequestId>a0162650-5d24-11e5-9069-97ba09a9521b</RequestId>\r\n</ErrorResponse>\r\n```\r\nIt reads like Salt is not transforming the security_groups name into a sg-xxxxxx number\r\n\r\nHere is my sls:\r\n````saltstack\r\nhezum-java-eb:\r\n  boto_elb.present:\r\n    - name: hezum-java-lb\r\n    - region: us-west-2\r\n    - keyid: {{ salt['pillar.get']('salt_cloud:id', None) }}\r\n    - key: {{ salt['pillar.get']('salt_cloud:key', None) }}\r\n    - availability_zones:\r\n      - us-west-2a\r\n      - us-west-2b\r\n      - us-west-2c\r\n    - security_groups:\r\n        - hezum-java-lb\r\n    - listeners:\r\n      - elb_port: 80\r\n        instance_port: 80\r\n        elb_protocol: TCP\r\n        instance_protocol: TCP\r\n      - elb_port: 443\r\n        instance_port: 443\r\n        elb_protocol: SSL\r\n        instance_protocol: SSL\r\n        certificate: 'arn:aws:iam::1234567890:server-certificate/hezum-startssl-2'\r\n    - health_check:\r\n        target: 'HTTPS:443/status/'\r\n        interval: 30\r\n        timeout: 5\r\n        unhealthy_threshold: 2\r\n    - attributes:\r\n        cross_zone_load_balancing:\r\n          enabled: true\r\n        connection_draining:\r\n          enabled: true\r\n          timeout: 300\r\n```\r\nAnd my Salt versions report: \r\n```yaml\r\nsalt --versions-report\r\nSalt Version:\r\n           Salt: 2015.8.0\r\n\r\nDependency Versions:\r\n         Jinja2: 2.7.3\r\n       M2Crypto: Not Installed\r\n           Mako: 1.0.0\r\n         PyYAML: 3.11\r\n          PyZMQ: 14.4.0\r\n         Python: 2.7.9 (default, Mar  1 2015, 12:57:24)\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: 2.2\r\n          gitdb: 0.5.4\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.2\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: 0.8.2\r\n        timelib: Not Installed\r\n\r\nSystem Versions:\r\n           dist: debian 8.2\r\n        machine: x86_64\r\n        release: 3.16.0-4-amd64\r\n         system: debian 8.2\r\n```\r\n\r\nThanks for any help! \r\nSam"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/141624918","html_url":"https://github.com/saltstack/salt/issues/27183#issuecomment-141624918","issue_url":"https://api.github.com/repos/saltstack/salt/issues/27183","id":141624918,"user":{"login":"samhamilton","id":415410,"avatar_url":"https://avatars.githubusercontent.com/u/415410?v=3","gravatar_id":"","url":"https://api.github.com/users/samhamilton","html_url":"https://github.com/samhamilton","followers_url":"https://api.github.com/users/samhamilton/followers","following_url":"https://api.github.com/users/samhamilton/following{/other_user}","gists_url":"https://api.github.com/users/samhamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/samhamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samhamilton/subscriptions","organizations_url":"https://api.github.com/users/samhamilton/orgs","repos_url":"https://api.github.com/users/samhamilton/repos","events_url":"https://api.github.com/users/samhamilton/events{/privacy}","received_events_url":"https://api.github.com/users/samhamilton/received_events","type":"User","site_admin":false},"created_at":"2015-09-19T05:53:01Z","updated_at":"2015-09-19T05:53:01Z","body":"Sure thing: \r\n\r\n```\r\n2015-09-19 05:39:30,505 [salt.state       ][INFO    ][10993] Running state [hezum-test-lb] at time 05:39:30.505372\r\n2015-09-19 05:39:30,506 [salt.state       ][INFO    ][10993] Executing state boto_elb.present for hezum-test-lb\r\n2015-09-19 05:39:30,916 [salt.loaded.int.module.boto_vpc][DEBUG   ][10993] examining subnet id: subnet-xxxx for vpc_id\r\n2015-09-19 05:39:30,916 [salt.loaded.int.module.boto_vpc][DEBUG   ][10993] subnet id: subnet-xxxx is associated with vpc id: vpc-xxxx\r\n2015-09-19 05:39:30,916 [salt.loaded.int.module.boto_vpc][DEBUG   ][10993] examining subnet id: subnet-xxxx for vpc_id\r\n2015-09-19 05:39:30,917 [salt.loaded.int.module.boto_vpc][DEBUG   ][10993] subnet id: subnet-xxxx is associated with vpc id: vpc-xxxx\r\n2015-09-19 05:39:30,917 [salt.loaded.int.module.boto_vpc][DEBUG   ][10993] examining subnet id: subnet-xxxx for vpc_id\r\n2015-09-19 05:39:30,917 [salt.loaded.int.module.boto_vpc][DEBUG   ][10993] subnet id: subnet-xxxx is associated with vpc id: vpc-xxxx\r\n2015-09-19 05:39:30,917 [salt.loaded.int.module.boto_vpc][DEBUG   ][10993] examining subnet id: subnet-xxxx for vpc_id\r\n2015-09-19 05:39:30,918 [salt.loaded.int.module.boto_vpc][DEBUG   ][10993] subnet id: subnet-xxxx is associated with vpc id: vpc-xxxx\r\n2015-09-19 05:39:30,918 [salt.loaded.int.module.boto_secgroup][DEBUG   ][10993] security group contents ['default'] pre-conversion\r\n2015-09-19 05:39:30,918 [salt.loaded.int.module.boto_secgroup][DEBUG   ][10993] calling boto_secgroup.get_group_id for group name default\r\n2015-09-19 05:39:30,919 [salt.loaded.int.module.boto_secgroup][DEBUG   ][10993] getting group for default in vpc_id {'vpc_id': u'vpc-xxxx'}\r\n2015-09-19 05:39:31,269 [salt.loaded.int.module.boto_secgroup][DEBUG   ][10993] group name default has group id False\r\n2015-09-19 05:39:31,270 [salt.loaded.int.module.boto_secgroup][DEBUG   ][10993] security group contents ['False'] post-conversion\r\n2015-09-19 05:39:31,584 [salt.loaded.int.module.boto_elb][DEBUG   ][10993] BotoServerError: 400 Bad Request\r\n<ErrorResponse xmlns=\"http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/\">\r\n  <Error>\r\n    <Type>Sender</Type>\r\n    <Code>LoadBalancerNotFound</Code>\r\n    <Message>Cannot find Load Balancer hezum-test-lb</Message>\r\n  </Error>\r\n  <RequestId>cd30ffb3-5e90-11e5-9d88-2f7dfcaf754d</RequestId>\r\n</ErrorResponse>\r\n\r\n2015-09-19 05:39:31,667 [salt.loaded.int.module.boto_elb][DEBUG   ][10993] BotoServerError: 400 Bad Request\r\n<ErrorResponse xmlns=\"http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/\">\r\n  <Error>\r\n    <Type>Sender</Type>\r\n    <Code>LoadBalancerNotFound</Code>\r\n    <Message>Cannot find Load Balancer hezum-test-lb</Message>\r\n  </Error>\r\n  <RequestId>cd3ce66a-5e90-11e5-8ff9-f1fd0e09303a</RequestId>\r\n</ErrorResponse>\r\n\r\n2015-09-19 05:39:32,671 [salt.loaded.int.module.boto_elb][DEBUG   ][10993] BotoServerError: 400 Bad Request\r\n<ErrorResponse xmlns=\"http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/\">\r\n  <Error>\r\n    <Type>Sender</Type>\r\n    <Code>InvalidSecurityGroup</Code>\r\n    <Message>Invalid id: &quot;False&quot; (expecting &quot;sg-...&quot;) (Service: AmazonEC2; Status Code: 400; Error Code: InvalidGroupId.Malformed; Request ID: b3371abd-00b3-4241-809c-9f12f9c87b98)</Message>\r\n  </Error>\r\n  <RequestId>cd4990af-5e90-11e5-ac14-13deec9d288c</RequestId>\r\n</ErrorResponse>\r\n\r\n2015-09-19 05:39:32,672 [salt.loaded.int.module.boto_elb][ERROR   ][10993] Failed to create ELB hezum-test-lb: BotoServerError: 400 Bad Request\r\n<ErrorResponse xmlns=\"http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/\">\r\n  <Error>\r\n    <Type>Sender</Type>\r\n    <Code>InvalidSecurityGroup</Code>\r\n    <Message>Invalid id: &quot;False&quot; (expecting &quot;sg-...&quot;) (Service: AmazonEC2; Status Code: 400; Error Code: InvalidGroupId.Malformed; Request ID: b3371abd-00b3-4241-809c-9f12f9c87b98)</Message>\r\n  </Error>\r\n  <RequestId>cd4990af-5e90-11e5-ac14-13deec9d288c</RequestId>\r\n</ErrorResponse>\r\n\r\n2015-09-19 05:39:32,672 [salt.state       ][ERROR   ][10993]  Failed to create hezum-test-lb ELB.\r\n2015-09-19 05:39:32,672 [salt.state       ][INFO    ][10993] Completed state [hezum-test-lb] at time 05:39:32.672347\r\n```"}}