diff --git a/CHANGELOG.v2.alpha.md b/CHANGELOG.v2.alpha.md index 2365faab95e6d..76415163c1d5e 100644 --- a/CHANGELOG.v2.alpha.md +++ b/CHANGELOG.v2.alpha.md @@ -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.147.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.147.0-alpha.0...v2.147.1-alpha.0) (2024-06-21) + ## [2.147.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.146.0-alpha.0...v2.147.0-alpha.0) (2024-06-20) diff --git a/CHANGELOG.v2.md b/CHANGELOG.v2.md index bba46a4f0ab9e..db207105d7d3a 100644 --- a/CHANGELOG.v2.md +++ b/CHANGELOG.v2.md @@ -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.147.1](https://github.com/aws/aws-cdk/compare/v2.147.0...v2.147.1) (2024-06-21) + + +### Reverts + +* route53 CrossAccountZoneDelegationRecord fails at deployment time with imported `delegatedZone` ([#30440](https://github.com/aws/aws-cdk/issues/30440))" ([#30606](https://github.com/aws/aws-cdk/issues/30606)) ([69eb617](https://github.com/aws/aws-cdk/commit/69eb617b45b5c4e495901d367d85e1edeea57e69)), closes [#30600](https://github.com/aws/aws-cdk/issues/30600) + ## [2.147.0](https://github.com/aws/aws-cdk/compare/v2.146.0...v2.147.0) (2024-06-20) diff --git a/packages/aws-cdk-lib/aws-route53/README.md b/packages/aws-cdk-lib/aws-route53/README.md index 6fd275a2eb478..1c26a12541242 100644 --- a/packages/aws-cdk-lib/aws-route53/README.md +++ b/packages/aws-cdk-lib/aws-route53/README.md @@ -313,7 +313,7 @@ const delegationRole = iam.Role.fromRoleArn(this, 'DelegationRole', delegationRo // create the record new route53.CrossAccountZoneDelegationRecord(this, 'delegate', { - delegatedZone: subZone, // Note that an imported HostedZone is not supported as Name Servers info will not be available + delegatedZone: subZone, parentHostedZoneName: 'someexample.com', // or you can use parentHostedZoneId delegationRole, }); diff --git a/packages/aws-cdk-lib/aws-route53/lib/record-set.ts b/packages/aws-cdk-lib/aws-route53/lib/record-set.ts index 3ee6f4aee669c..6706443b1f260 100644 --- a/packages/aws-cdk-lib/aws-route53/lib/record-set.ts +++ b/packages/aws-cdk-lib/aws-route53/lib/record-set.ts @@ -929,10 +929,6 @@ export class CrossAccountZoneDelegationRecord extends Construct { throw Error('Only one of parentHostedZoneName and parentHostedZoneId is supported'); } - if (!props.delegatedZone.hostedZoneNameServers) { - throw Error(`Not able to retrieve Name Servers for ${props.delegatedZone.zoneName} due to it being imported.`); - } - const provider = CrossAccountZoneDelegationProvider.getOrCreateProvider(this, CROSS_ACCOUNT_ZONE_DELEGATION_RESOURCE_TYPE); const role = iam.Role.fromRoleArn(this, 'cross-account-zone-delegation-handler-role', provider.roleArn); diff --git a/packages/aws-cdk-lib/aws-route53/test/record-set.test.ts b/packages/aws-cdk-lib/aws-route53/test/record-set.test.ts index 9974237f6292c..20abd698ee68b 100644 --- a/packages/aws-cdk-lib/aws-route53/test/record-set.test.ts +++ b/packages/aws-cdk-lib/aws-route53/test/record-set.test.ts @@ -893,27 +893,6 @@ describe('record set', () => { }); }); - test('CrossAccountZoneDelegationRecord should throw if delegatedZone is imported', () => { - // GIVEN - const stack = new Stack(); - const parentZone = new route53.PublicHostedZone(stack, 'ParentHostedZone', { - zoneName: 'myzone.com', - }); - - // WHEN - const childZone = route53.PublicHostedZone.fromPublicHostedZoneAttributes(stack, 'ChildHostedZone', { - hostedZoneId: 'fake-id', - zoneName: 'fake-name', - }); - - //THEN - expect(() => new route53.CrossAccountZoneDelegationRecord(stack, 'Delegation', { - delegatedZone: childZone, - parentHostedZoneId: parentZone.hostedZoneId, - delegationRole: parentZone.crossAccountZoneDelegationRole!, - })).toThrow(/Not able to retrieve Name Servers for fake-name due to it being imported./); - }); - testDeprecated('Cross account zone delegation record with parentHostedZoneName', () => { // GIVEN const stack = new Stack(); diff --git a/version.v2.json b/version.v2.json index 12a25bfeb85eb..9011996ed4acb 100644 --- a/version.v2.json +++ b/version.v2.json @@ -1,4 +1,4 @@ { - "version": "2.147.0", - "alphaVersion": "2.147.0-alpha.0" + "version": "2.147.1", + "alphaVersion": "2.147.1-alpha.0" } \ No newline at end of file