jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Coder One <coder_...@yahoo.com>
Subject Re: VPC/Subnet/SecurityGroup - Doc Correct?
Date Sun, 24 Nov 2013 19:01:50 GMT
Fantastic...here is the code to assign a VPC subnet and a VPC security group to help other
readers.

template.getOptions().as(AWSEC2TemplateOptions.class).subnetId(subnetId).securityGroupIds(securityGroupId);


And the EC2-classic approach.

template.getOptions().as(AWSEC2TemplateOptions.class).subnetId(subnetId).securityGroups(securityGroupName);


On Sunday, November 24, 2013 9:49 AM, Andrew Phillips <andrewp@apache.org> wrote:
> I hope the statement above does not mean that it is not possible to  
> designate a VPC and a given Security Group for a given machine  
> instance.

It means that (as per the Amazon docs, too [1]), you cannot assign a  
VPC and a security group *name* ("old-style" security groups) at the  
same time.

You *can*, however, assign a VPC and a security group *ID*  
("VPC-style" security groups).


ap

[1]  
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-RunInstances.html,
look for  
"SecurityGroup.n"


Mime
View raw message