Skip to content

Commit fee0638

Browse files
feat(ec2): support the new ServiceRegion property for AWS::EC2::VPCEndpoint (#35025)
### Issue # (if applicable) Closes #32785 ### Reason for this change Supporting the new L1 property in the L2 construct. `AWS::EC2::VPCEndpointService` support was added in #33959, so this should complete support for cross-region vpc private links. ### Description of changes Added a new L2 prop - `serviceRegion` - which is of type `string`. It gets passed to the L1 `ServiceRegion` property when present. ### Describe any new or updated permissions being added None ### Description of how you validated changes Added unit tests ### Checklist - [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 7ebcf5c commit fee0638

File tree

10 files changed

+680
-12
lines changed

10 files changed

+680
-12
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.vpc-endpoint.lit.js.snapshot/aws-cdk-ec2-vpc-endpoint.assets.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.vpc-endpoint.lit.js.snapshot/aws-cdk-ec2-vpc-endpoint.template.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,90 @@
774774
"Ref": "MyVpcF9F0CA6F"
775775
}
776776
}
777+
},
778+
"MyVpcCrossRegionEndpointSecurityGroup371BDCEC": {
779+
"Type": "AWS::EC2::SecurityGroup",
780+
"Properties": {
781+
"GroupDescription": "aws-cdk-ec2-vpc-endpoint/MyVpc/CrossRegionEndpoint/SecurityGroup",
782+
"SecurityGroupEgress": [
783+
{
784+
"CidrIp": "0.0.0.0/0",
785+
"Description": "Allow all outbound traffic by default",
786+
"IpProtocol": "-1"
787+
}
788+
],
789+
"SecurityGroupIngress": [
790+
{
791+
"CidrIp": {
792+
"Fn::GetAtt": [
793+
"MyVpcF9F0CA6F",
794+
"CidrBlock"
795+
]
796+
},
797+
"Description": {
798+
"Fn::Join": [
799+
"",
800+
[
801+
"from ",
802+
{
803+
"Fn::GetAtt": [
804+
"MyVpcF9F0CA6F",
805+
"CidrBlock"
806+
]
807+
},
808+
":443"
809+
]
810+
]
811+
},
812+
"FromPort": 443,
813+
"IpProtocol": "tcp",
814+
"ToPort": 443
815+
}
816+
],
817+
"Tags": [
818+
{
819+
"Key": "Name",
820+
"Value": "aws-cdk-ec2-vpc-endpoint/MyVpc"
821+
}
822+
],
823+
"VpcId": {
824+
"Ref": "MyVpcF9F0CA6F"
825+
}
826+
}
827+
},
828+
"MyVpcCrossRegionEndpoint9A9ABB87": {
829+
"Type": "AWS::EC2::VPCEndpoint",
830+
"Properties": {
831+
"PrivateDnsEnabled": false,
832+
"SecurityGroupIds": [
833+
{
834+
"Fn::GetAtt": [
835+
"MyVpcCrossRegionEndpointSecurityGroup371BDCEC",
836+
"GroupId"
837+
]
838+
}
839+
],
840+
"ServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-123456",
841+
"ServiceRegion": "us-east-1",
842+
"SubnetIds": [
843+
{
844+
"Ref": "MyVpcPrivateSubnet1Subnet5057CF7E"
845+
},
846+
{
847+
"Ref": "MyVpcPrivateSubnet2Subnet0040C983"
848+
}
849+
],
850+
"Tags": [
851+
{
852+
"Key": "Name",
853+
"Value": "aws-cdk-ec2-vpc-endpoint/MyVpc"
854+
}
855+
],
856+
"VpcEndpointType": "Interface",
857+
"VpcId": {
858+
"Ref": "MyVpcF9F0CA6F"
859+
}
860+
}
777861
}
778862
},
779863
"Parameters": {

packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.vpc-endpoint.lit.js.snapshot/cdk.out

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.vpc-endpoint.lit.js.snapshot/integ.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)