Is your feature request related to a problem?
The parameters serverAccessType and restrictServerAccessTo are required, and always update the security group, even if a user has already configured a security group and is using securityGroupId.
When no security group is provided, one is created using those parameters (good).
When a security group is provided, those parameters are added to the security group (sort-of-good but duplicates existing rules often).
When a security group is provided, and serverAccessType=securityGroupId and restrictSeverAccessTo matches the value of securityGroupId, the security group is updated with a rule referencing itself.
What solution would you like?
Perform an equality check between the parameters securityGroupId and restrictServerAccessTo in the case where serverAccessType is securityGroupId. In this edge case, do not update the security group rules.
What alternatives have you considered?
Letting the useless/duplicate/self-referencing rules accumulate on the security group and periodically clean them up from the EC2 console.
Is your feature request related to a problem?
The parameters
serverAccessTypeandrestrictServerAccessToare required, and always update the security group, even if a user has already configured a security group and is usingsecurityGroupId.When no security group is provided, one is created using those parameters (good).
When a security group is provided, those parameters are added to the security group (sort-of-good but duplicates existing rules often).
When a security group is provided, and
serverAccessType=securityGroupIdandrestrictSeverAccessTomatches the value ofsecurityGroupId, the security group is updated with a rule referencing itself.What solution would you like?
Perform an equality check between the parameters
securityGroupIdandrestrictServerAccessToin the case whereserverAccessTypeissecurityGroupId. In this edge case, do not update the security group rules.What alternatives have you considered?
Letting the useless/duplicate/self-referencing rules accumulate on the security group and periodically clean them up from the EC2 console.