You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AWS Security Groups is a property that can be specified per EC2 instance during its creation. It is also used in other resources like ELBs, RDS instances, etc... Different instances and resources can use different Security Groups, regardless the VPC and subnet they are located.
To workaround the issue, if it is required different security groups in different instances in the same network, one is forced to "artificially" split the network definition in two networks. If several security groups are required, several different networks must be defined, making the manifest difficult to understand and manage. See below for an example.
Expected behaviour
As security groups in AWS is a property assigned per instance, it is desirable that security groups can be defined in the resource_pool, as in resource_pool.<id>.cloud_properties.security_groups.
As the CPI currently allows the SG definition in the network, such feature should not be removed, instead we can add the new feature as:
resource_pool.<id>.cloud_properties.security_groups completely overrides the ones defined in the networks.
resource_pool.<id>.cloud_properties.security_groups is merged with the ones defined in the network.
Two new properties, resource_pool.<id>.cloud_properties.security_groups to override and resource_pool.<id>.cloud_properties.additional_security_groups to merge.
Example use case
We want to implement RDS for Cloud Controller and UAA, and setup security groups to only allow API/CloudController and UAA instances connect to our RDS instance.
For that, we create a new AWS security group called cf_rds_clients, which needs to be assigned ONLY to API instances and UAA.
With the current implementation we must define a new network in the manifest only for the api and uaa jobs, which is counter intuitive and requires additional work.
If SG can be defined in the resource pool, we simple need to define a new resource pool type for api and uaa.
If we want to setup a new SG, we need to split that network, allocating a range of IPs which will be reserved in the old network but used in the new one.
Test the case of resource_pools defining the security group.
In this case, resource_pool defined security groups will have precedence
over network specification security groups and aws default security
groups.
Describes the issue cloudfoundry#27
Problem description
AWS Security Groups is a property that can be specified per EC2 instance during its creation. It is also used in other resources like ELBs, RDS instances, etc... Different instances and resources can use different Security Groups, regardless the VPC and subnet they are located.
But BOSH AWS CPI only allows assign security groups in the network definition (
networks.<id>.cloud_properties.security_groups
), so that ALL the instances defined in that network will have the same security groups.To workaround the issue, if it is required different security groups in different instances in the same network, one is forced to "artificially" split the network definition in two networks. If several security groups are required, several different networks must be defined, making the manifest difficult to understand and manage. See below for an example.
Expected behaviour
As security groups in AWS is a property assigned per instance, it is desirable that security groups can be defined in the
resource_pool
, as inresource_pool.<id>.cloud_properties.security_groups
.As the CPI currently allows the SG definition in the network, such feature should not be removed, instead we can add the new feature as:
resource_pool.<id>.cloud_properties.security_groups
completely overrides the ones defined in the networks.resource_pool.<id>.cloud_properties.security_groups
is merged with the ones defined in the network.resource_pool.<id>.cloud_properties.security_groups
to override andresource_pool.<id>.cloud_properties.additional_security_groups
to merge.Example use case
We want to implement RDS for Cloud Controller and UAA, and setup security groups to only allow API/CloudController and UAA instances connect to our RDS instance.
For that, we create a new AWS security group called
cf_rds_clients
, which needs to be assigned ONLY to API instances and UAA.With the current implementation we must define a new network in the manifest only for the api and uaa jobs, which is counter intuitive and requires additional work.
If SG can be defined in the resource pool, we simple need to define a new resource pool type for api and uaa.
Example of workaround
In a normal network definition like this:
If we want to setup a new SG, we need to split that network, allocating a range of IPs which will be reserved in the old network but used in the new one.
The text was updated successfully, but these errors were encountered: