Created
June 21, 2012 18:28
-
-
Save smith3v/2967604 to your computer and use it in GitHub Desktop.
A bug in knife-ec2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ knife ec2 server create --groups sg-4e63c727 | |
ERROR: Fog::Compute::AWS::NotFound: The security group 'sg-4e63c727' does not exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pry(main)> require 'fog' | |
pry(main)> compute = Fog::Compute.new({:provider => 'AWS', :aws_access_key_id => ENV['AWS_ACCESS_KEY_ID'], :aws_secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']}) | |
pry(main)> compute.describe_security_groups.body['securityGroupInfo'].keep_if { |gr| gr['groupId'] == 'sg-4e63c727' } | |
=> [{"ipPermissions"=> | |
[{"groups"=>[], | |
"ipRanges"=>[{"cidrIp"=>"0.0.0.0/0"}], | |
"ipProtocol"=>"tcp", | |
"fromPort"=>0, | |
"toPort"=>65535}, | |
{"groups"=>[], | |
"ipRanges"=>[{"cidrIp"=>"0.0.0.0/0"}], | |
"ipProtocol"=>"tcp", | |
"fromPort"=>80, | |
"toPort"=>80}, | |
{"groups"=>[], | |
"ipRanges"=>[{"cidrIp"=>"0.0.0.0/0"}], | |
"ipProtocol"=>"tcp", | |
"fromPort"=>443, | |
"toPort"=>443}, | |
{"groups"=>[], | |
"ipRanges"=>[{"cidrIp"=>"0.0.0.0/0"}], | |
"ipProtocol"=>"tcp", | |
"fromPort"=>8080, | |
"toPort"=>8080}], | |
"ipPermissionsEgress"=>[], | |
"ownerId"=>"284139518214", | |
"groupId"=>"sg-4e63c727", | |
"groupName"=>"test", | |
"groupDescription"=>"test"}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment