Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: ec2-0.5.12
-
Fix Version/s: None
-
Component/s: knife-ec2
-
Labels:
-
Environment:Hide
$ gem list --local
-
-
- LOCAL GEMS ***
-
builder (3.0.0)
bunny (0.7.9)
chef (10.12.0)
coderay (1.0.6, 0.9.8)
erubis (2.7.0)
excon (0.13.4)
fog (1.3.1)
foodcritic (1.4.0)
formatador (0.2.3)
gherkin (2.8.0)
gist (2.0.4)
highline (1.6.13)
ipaddress (0.8.0)
json (1.6.1)
knife-ec2 (0.5.12)
method_source (0.7.1, 0.6.7)
mime-types (1.19)
mixlib-authentication (1.1.4)
mixlib-cli (1.2.2)
mixlib-config (1.1.2)
mixlib-log (1.4.1)
mixlib-shellout (1.0.0)
moneta (0.6.0)
multi_json (1.3.6)
net-scp (1.0.4)
net-ssh (2.2.2)
net-ssh-gateway (1.1.0)
net-ssh-multi (1.1)
nokogiri (1.5.4, 1.5.0)
ohai (6.14.0)
polyglot (0.3.3)
pry (0.9.9.6, 0.9.7.4)
pry-doc (0.3.0)
rak (1.4)
rest-client (1.6.7)
ruby-hmac (0.4.0)
ruby_parser (2.3.1)
sexp_processor (3.2.0)
slop (2.4.4, 2.1.0)
systemu (2.5.1)
treetop (1.4.10)
uuidtools (2.1.2)
yajl-ruby (1.1.0)
yard (0.8.2.1)Show$ gem list --local LOCAL GEMS *** builder (3.0.0) bunny (0.7.9) chef (10.12.0) coderay (1.0.6, 0.9.8) erubis (2.7.0) excon (0.13.4) fog (1.3.1) foodcritic (1.4.0) formatador (0.2.3) gherkin (2.8.0) gist (2.0.4) highline (1.6.13) ipaddress (0.8.0) json (1.6.1) knife-ec2 (0.5.12) method_source (0.7.1, 0.6.7) mime-types (1.19) mixlib-authentication (1.1.4) mixlib-cli (1.2.2) mixlib-config (1.1.2) mixlib-log (1.4.1) mixlib-shellout (1.0.0) moneta (0.6.0) multi_json (1.3.6) net-scp (1.0.4) net-ssh (2.2.2) net-ssh-gateway (1.1.0) net-ssh-multi (1.1) nokogiri (1.5.4, 1.5.0) ohai (6.14.0) polyglot (0.3.3) pry (0.9.9.6, 0.9.7.4) pry-doc (0.3.0) rak (1.4) rest-client (1.6.7) ruby-hmac (0.4.0) ruby_parser (2.3.1) sexp_processor (3.2.0) slop (2.4.4, 2.1.0) systemu (2.5.1) treetop (1.4.10) uuidtools (2.1.2) yajl-ruby (1.1.0) yard (0.8.2.1) -
Description
knife-ec2 v0.5.10 allowed to use the Amazon security group IDs (for instance, sg-4e63c727) on server creation. But v0.5.12 returns the error in such the case:
—
$ knife ec2 server create --groups sg-4e63c727
ERROR: Fog::Compute::AWS::NotFound: The security group 'sg-4e63c727' does not exist
—
The group exists:
—
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"}]
—
I propose to return the previous behavior and let to use groupId along with groupName.
Activity
- All
- Comments
- History
- Activity
- Transitions Summary
I think maybe you want to use a different flag --security-group-ids ?