fog/fog — Issue #713: Security Group vs. Subnet on VPC instance
Author: ncantor
Created: 2012-01-26 15:14:54+00:00
State: open

I was just reviewing the code for fog, and came across this comment:

# If subnet is defined we are working on a virtual private cloud.
# subnet & security group cannot co-exist. I wish VPC just ignored
# the security group parameter instead, it would be much easier!
if subnet_id
options.delete('SecurityGroup')
else
options.delete('SubnetId')
end

I'm currently working on implementing VPC, and when I output the instance, I get this:

"region-20120126-1052-13", "Project"=>"region", "Roles"=>"region"},
user_data=nil

This server is a VPC server, has an SG defined, and subnet_id set to nil. It appears that this is something that fog is doing, because if I look at the subnet ID in the EC2 Instances GUI, I see this:

Subnet ID: subnet-

It looks like Amazon has changed the API so that SGs and subnets can coexist. Does Fog need to be updated?

--Noah