-
Notifications
You must be signed in to change notification settings - Fork 38
Description
When defining a MachineSet with the AWSProvider, using tag:Name filters behaves poorly, as the query returns all security groups with a matching tag:Name value, even when they are not in the AWS VPC the subnet you specify in the MachineSet belongs to.
If you have >5 VPCs, and each has a security group with the same tag:Name value, the query returns >5 security group IDs. This results in a Machine provisioning failure with error launching instance: You have exceeded the maximum number of security groups allowed per network interface. The default for this quota is 5.
Can the filter query be limited to returning only SGs that are in the VPC the subnet you specify belongs to? It is not possible to assign SGs associated with one VPC to a machine created in another VPC.
In this example, sg-2 may return many results, even though subnet-abc123 is associated with a specific VPC which can only have one sg-2.
securityGroups:
- filters:
- name: 'tag:Name'
values:
- sg-1
- sg-2
...
subnet:
id: subnet-abc123
Using the security group ID works okay, but security id's are hard for humans to recognize.
securityGroups:
- filters:
- name: 'tag:Name'
values:
- sg-1
-id : sg-abc123
...
subnet:
id: subnet-abc123