Skip to content

Commit

Permalink
chore(release): 2.159.1 (#31498)
Browse files Browse the repository at this point in the history
See CHANGELOG
  • Loading branch information
mergify[bot] authored Sep 19, 2024
2 parents d77a1b2 + f1d8e82 commit c66f4e3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 48 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.159.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.159.0-alpha.0...v2.159.1-alpha.0) (2024-09-19)

## [2.159.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.158.0-alpha.0...v2.159.0-alpha.0) (2024-09-18)


Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.159.1](https://github.com/aws/aws-cdk/compare/v2.159.0...v2.159.1) (2024-09-19)


### Reverts

* fix(ec2): fixing vpc endpoint pattern for ecr and ecr docker ([#31496](https://github.com/aws/aws-cdk/issues/31496)) ([f7e8452](https://github.com/aws/aws-cdk/commit/f7e8452012623d55a21428edafdc12c29f7fc92b))

## [2.159.0](https://github.com/aws/aws-cdk/compare/v2.158.0...v2.159.0) (2024-09-18)


Expand Down
16 changes: 1 addition & 15 deletions packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { ISubnet, IVpc, SubnetSelection } from './vpc';
import * as iam from '../../aws-iam';
import * as cxschema from '../../cloud-assembly-schema';
import { Aws, ContextProvider, IResource, Lazy, Resource, Stack, Token } from '../../core';
import { PARTITION_MAP } from '../../region-info/build-tools/fact-tables';

/**
* A VPC endpoint.
Expand Down Expand Up @@ -667,21 +666,8 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ
'redshift', 'redshift-data', 's3', 'sagemaker.api', 'sagemaker.featurestore-runtime', 'sagemaker.runtime', 'securityhub',
'servicecatalog', 'sms', 'sqs', 'states', 'sts', 'sync-states', 'synthetics', 'transcribe', 'transcribestreaming', 'transfer',
'workspaces', 'xray'],
'us-isof-': ['ecr.api', 'ecr.dkr'],
'eu-isoe-': ['ecr.api', 'ecr.dkr'],
};

const regionPartition = region.split('-').slice(0, 2).join('-');
const partitionDetails = PARTITION_MAP[`${regionPartition}-`];

// Check for specific service name under isolated region prefix
const serviceInExceptions = VPC_ENDPOINT_SERVICE_EXCEPTIONS[`${regionPartition}-`]?.includes(name);

if (serviceInExceptions) {
// Endpoints generated in reverse of domain suffix for the services mentioned in map
const reverseString = partitionDetails.domainSuffix.split('.').reverse().join('.');
return reverseString;
} else if (VPC_ENDPOINT_SERVICE_EXCEPTIONS[region]?.includes(name)) {
if (VPC_ENDPOINT_SERVICE_EXCEPTIONS[region]?.includes(name)) {
return 'cn.com.amazonaws';
} else {
return 'com.amazonaws';
Expand Down
31 changes: 0 additions & 31 deletions packages/aws-cdk-lib/aws-ec2/test/vpc-endpoint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -694,37 +694,6 @@ describe('vpc endpoint', () => {
});

});

test.each([
['us-isof-test-1', 'gov.ic.hci.csp'],
['eu-isoe-test-1', 'uk.adc-e.cloud'],
['us-east-1', 'com.amazonaws'],
['us-gov-west-1', 'com.amazonaws'],
['cn-northwest-1', 'cn.com.amazonaws'],
['cn-north-1', 'cn.com.amazonaws'],
])('test vpc interface endpoint for ECR can be created correctly in all regions', (region : string, domain: string) => {
//GIVEN
const stack = new Stack(undefined, 'TestStack', { env: { account: '123456789012', region: region } });
const vpc = new Vpc(stack, 'VPC');

//WHEN
vpc.addInterfaceEndpoint('ECR Endpoint', {
service: InterfaceVpcEndpointAwsService.ECR,
});

vpc.addInterfaceEndpoint('ECR Docker Endpoint', {
service: InterfaceVpcEndpointAwsService.ECR_DOCKER,
});

//THEN
Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', {
ServiceName: `${domain}.${region}.ecr.api`,
});
Template.fromStack(stack).hasResourceProperties('AWS::EC2::VPCEndpoint', {
ServiceName: `${domain}.${region}.ecr.dkr`,
});
});

test.each([
['transcribe', InterfaceVpcEndpointAwsService.TRANSCRIBE],
])('test vpc interface endpoint with .cn suffix for %s can be created correctly in China regions', (name: string, given: InterfaceVpcEndpointAwsService) => {
Expand Down
4 changes: 2 additions & 2 deletions version.v2.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.159.0",
"alphaVersion": "2.159.0-alpha.0"
"version": "2.159.1",
"alphaVersion": "2.159.1-alpha.0"
}

0 comments on commit c66f4e3

Please sign in to comment.