You must choose Security Group(s) or Security Groups ID(s) that are define within the VPC containing the subnet referred to by the awsMachineSubnet parameter.
Configure only one of the two parameters. Setting both is useless and might result in provisioning error if they don't match.
SecurityGroups — (Array)
[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.
Default: Amazon EC2 uses the default security group.
SecurityGroupIds — (Array)
One or more security group IDs. You can create a security group using CreateSecurityGroup.
Default: Amazon EC2 uses the default security group.
Notes:
couldn't find existing tests for the AWS driver at all, so example to start from to test these new parameters but tested them on my config and it works.
Coverage remained the same at 70.542% when pulling bc591995dbcfb8db861fe1fb5149cca966425375 on patlachance:feature-508-assign-custom-security-groups into eaf00b4fd712f6a10e88941381120d421012a7b8 on Nanocloud:master.
508 Handling Security Groups and Security Group IDs for AWS
To attach custom security groups to your "nanocloud exec servers", proceed as follow:
From AWS console or using the aws-cli tool
Then, configure your Nanocloud environment using the values just found by changing config/env/development or creating a config/local.js file
Sample config/local.js file:
You must choose Security Group(s) or Security Groups ID(s) that are define within the VPC containing the subnet referred to by the awsMachineSubnet parameter.
Configure only one of the two parameters. Setting both is useless and might result in provisioning error if they don't match.
Please note that using Security Group name(s) is only supported in EC2-Classic or in the default VPC, not in user-created VPCs. From AWS EC2 'runInstances' SDK function documentation (http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EC2.html#runInstances-property)
Default: Amazon EC2 uses the default security group.
Default: Amazon EC2 uses the default security group.
Notes: