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
CloudFormation Incorrectly preventing the creation of SG. CFN prevents creating Security Groups (SGs) with the same name in different accounts within a shared VPC when using CloudFormation (CFN). While this is possible manually, attempting it via CloudFormation fails if the SG is created in the participant account first, followed by the owner account.
Expected Behavior
Creating Security Groups (SGs) with the same name in different accounts within a shared VPC should be allowed via CFN.
Observed Behavior
CloudFormation performs a lookup based on the Security Group name. In shared VPC scenarios, the VPC owner account can see all Security Groups across accounts, while participant accounts only see their own.
Test Cases
Replication Notes
Create a shared VPC using RAM, here you will going to share a VPC and Subnets from management account to member account.
Verify you are able to see management account VPC in member account
It will fail, Failed with an error - Resource handler returned message: "Security Group with my-security-group already exists" (RequestToken: xxx , HandlerErrorCode: AlreadyExists)
However creating the SG in management account first followed by member account works fine.
Other Details
No response
The text was updated successfully, but these errors were encountered:
Name of the resource
AWS::EC2::SecurityGroup
Resource Name
No response
Issue Description
CloudFormation Incorrectly preventing the creation of SG. CFN prevents creating Security Groups (SGs) with the same name in different accounts within a shared VPC when using CloudFormation (CFN). While this is possible manually, attempting it via CloudFormation fails if the SG is created in the participant account first, followed by the owner account.
Expected Behavior
Creating Security Groups (SGs) with the same name in different accounts within a shared VPC should be allowed via CFN.
Observed Behavior
CloudFormation performs a lookup based on the Security Group name. In shared VPC scenarios, the VPC owner account can see all Security Groups across accounts, while participant accounts only see their own.
Test Cases
Replication Notes
Resources:
InstanceSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Allow http to client host
GroupName: 'my-security-group'
VpcId: 'vpc-xxx'
This will be created successfully
It will fail, Failed with an error - Resource handler returned message: "Security Group with my-security-group already exists" (RequestToken: xxx , HandlerErrorCode: AlreadyExists)
Other Details
No response
The text was updated successfully, but these errors were encountered: