Describe the bug
When 2 (I assume or more) Security groups with an identical name are assigned to an ENIs security group list, deleting one, will delete all of the same name.
Regression Issue
Expected Behavior
I expected to only delete security group ID sg-075407198e27a64bc, but it also deleted sg-0811e4163b09b96c7
Current Behavior
It deletes all security groups with the identical name, which is incorrect, it should delete only the selected item.
Reproduction Steps
This is done via the GUI
I believe this was the order this will work in. It requires the same region and 2 different AWS accounts.
Create and share a vpc and at least 1 subnet in account 1
Share this with account 2 via RAM
Create a SG in account 1 name it "My SG"
Create a SG in account 2 name it "My SG" (must be the same name)
Share the new SG from account 2 to account 1 with RAM
Back in account 1 add BOTH newly created SG to any eni and save it.
Edit the ENIs security groups again and remove the shared one. You will find that both SG disappear.
It looks like the deletion is being done on Security Group Name, NOT Security group ID
Possible Solution
ensure the Remove button on the GUI removes by ID, not name
Additional Information/Context
No response
CLI version used
N/A
Environment details (OS name and version, etc.)
N/A
Describe the bug
When 2 (I assume or more) Security groups with an identical name are assigned to an ENIs security group list, deleting one, will delete all of the same name.
Regression Issue
Expected Behavior
I expected to only delete security group ID sg-075407198e27a64bc, but it also deleted sg-0811e4163b09b96c7
Current Behavior
It deletes all security groups with the identical name, which is incorrect, it should delete only the selected item.
Reproduction Steps
This is done via the GUI
I believe this was the order this will work in. It requires the same region and 2 different AWS accounts.
Create and share a vpc and at least 1 subnet in account 1
Share this with account 2 via RAM
Create a SG in account 1 name it "My SG"
Create a SG in account 2 name it "My SG" (must be the same name)
Share the new SG from account 2 to account 1 with RAM
Back in account 1 add BOTH newly created SG to any eni and save it.
Edit the ENIs security groups again and remove the shared one. You will find that both SG disappear.
It looks like the deletion is being done on Security Group Name, NOT Security group ID
Possible Solution
ensure the Remove button on the GUI removes by ID, not name
Additional Information/Context
No response
CLI version used
N/A
Environment details (OS name and version, etc.)
N/A