def create name, options = {}
description = options[:description] || name
create_opts = {}
create_opts[:group_name] = name
create_opts[:description] = description
vpc_id = options[:vpc]
vpc_id ||= options[:vpc_id]
vpc_id ||= filter_value_for('vpc-id')
vpc_id = vpc_id.id if vpc_id.is_a?(VPC)
create_opts[:vpc_id] = vpc_id if vpc_id
response = client.create_security_group(create_opts)
SecurityGroup.new(response.group_id, {
:name => name,
:description => description,
:vpc_id => create_opts[:vpc_id],
:config => config })
end