Skip to content
This repository has been archived by the owner on Jul 25, 2020. It is now read-only.

JCLOUDS-987: Create security groups in AWS if subnetId is specified #858

Closed
wants to merge 1 commit into from
Closed

JCLOUDS-987: Create security groups in AWS if subnetId is specified #858

wants to merge 1 commit into from

Conversation

nacx
Copy link
Member

@nacx nacx commented Sep 16, 2015

https://issues.apache.org/jira/browse/JCLOUDS-987

The changes required to make this work are basically:

  • Call the logic to create the security groups also when the subnet id is set.
  • Get the VPC id for the given subnet, as it is mandatory when creating security groups for instances that run in the VPC.
  • Use the security group id instead of the name, as it is mandatory when creating them in an VPC.

The changes are pretty straightforward, but there is a subtle change: AWS-EC2 and the generic EC2 providers have a cache "region/group" -> String where the resulting String is the security group name for that group. In AWS-EC2 now the resulting String is the security group ID instead of its name, allowing the creation of security groups in VPCs (and saving an API call in most cases). The id form is always used to create security groups in AWS-EC2 (the generic EC2 provider remains unchanged as there is no VPC support there).

@abayer a quick review would be highly appreciated.
@richardcloudsoft Could you test if this change fixes the issue?

@nacx
Copy link
Member Author

nacx commented Sep 16, 2015

Looks like a transient Jenkins failure: rebuild please!

@nacx nacx changed the title JCLOUDS-997: Create security groups in AWS if subnetId is specified JCLOUDS-987: Create security groups in AWS if subnetId is specified Oct 29, 2015
@nacx
Copy link
Member Author

nacx commented Oct 29, 2015

Rebased, amended the commit message and pushed to master as 985d4512.

@nacx nacx closed this Oct 29, 2015
@nacx nacx deleted the 987-sgsubnet branch October 29, 2015 00:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant