From 69eb617b45b5c4e495901d367d85e1edeea57e69 Mon Sep 17 00:00:00 2001 From: Samson Keung Date: Fri, 21 Jun 2024 09:24:06 -0700 Subject: [PATCH 1/3] revert: route53 CrossAccountZoneDelegationRecord fails at deployment time with imported `delegatedZone` (#30440)" (#30606) This reverts commit a3d9b10ad9036486961f74e852493aa9684cfdb4. ### Issue # (if applicable) Closes #30600. ### Reason for this change Reverting https://github.com/aws/aws-cdk/pull/30440 so that `cdk synth` succeed when using imported `delegatedZone` ### Description of changes Removed the `throw new Error()` ### Description of how you validated changes ### 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* --- packages/aws-cdk-lib/aws-route53/README.md | 2 +- .../aws-cdk-lib/aws-route53/lib/record-set.ts | 4 ---- .../aws-route53/test/record-set.test.ts | 21 ------------------- 3 files changed, 1 insertion(+), 26 deletions(-) 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(); From 63f3c019626172d0e1384e82883439cb1c7a53a3 Mon Sep 17 00:00:00 2001 From: Calvin Combs Date: Fri, 21 Jun 2024 09:45:24 -0700 Subject: [PATCH 2/3] chore(release): 2.147.1 --- CHANGELOG.v2.alpha.md | 2 ++ CHANGELOG.v2.md | 7 +++++++ version.v2.json | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) 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/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 From 7f5aea618bb8de426f45fd59dcf6efd63a3ab1f9 Mon Sep 17 00:00:00 2001 From: Tietew Date: Wed, 26 Jun 2024 14:48:21 +0900 Subject: [PATCH 3/3] chore(codebuild): fix the comment at CodeBuildImage.AMAZON_LINUX_2_ARM_3 (#30670) ### Description of changes Fixed typo in the comment at CodeBuildImage.AMAZON_LINUX_2_ARM_3. ### 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* --- packages/aws-cdk-lib/aws-codebuild/lib/project.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-codebuild/lib/project.ts b/packages/aws-cdk-lib/aws-codebuild/lib/project.ts index a6f04fca4504a..7e8517a584c5c 100644 --- a/packages/aws-cdk-lib/aws-codebuild/lib/project.ts +++ b/packages/aws-cdk-lib/aws-codebuild/lib/project.ts @@ -1843,7 +1843,7 @@ export class LinuxBuildImage implements IBuildImage { * */ public static readonly AMAZON_LINUX_2_ARM_2 = LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0; /** - * Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0". + * Image "aws/codebuild/amazonlinux2-aarch64-standard:3.0". * @see {LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0} * */ public static readonly AMAZON_LINUX_2_ARM_3 = LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0;