Skip to content

fix(route53): IHostedZone cannot be used for ses.Identity.publicHostedZone anymore#26888

Merged
mergify[bot] merged 2 commits intoaws:mainfrom
lpizzinidev:gh-26872
Aug 25, 2023
Merged

fix(route53): IHostedZone cannot be used for ses.Identity.publicHostedZone anymore#26888
mergify[bot] merged 2 commits intoaws:mainfrom
lpizzinidev:gh-26872

Conversation

@lpizzinidev
Copy link
Copy Markdown
Contributor

@lpizzinidev lpizzinidev commented Aug 25, 2023

Identity.publicHostedZone takes an IPublicHostedZone, but because of TypeScript structural typing it would also accept an IHostedZone.

When in this PR the grantDelegation method was added to the IPublicHostedZone interface, this passing was no longer allowed and code that used to work on accident, no longer works.

For example:

const zone = HostedZone.fromHostedZoneId(stack, 'Zone', 'hosted-id');
const sesIdentity = ses.Identity.publicHostedZone(zone);

It raises an error because the imported zone does not implement the grantDelegation method.

This fix moves the grantDelegation method declaration into the IHostedZone interface and makes it available to all imported zones.

Closes #26872.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels Aug 25, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team August 25, 2023 14:11
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Aug 25, 2023
@rix0rrr rix0rrr changed the title fix(route53): imported hosted zone doesn't implement grantDelegation method fix(route53): IHostedZone cannot be used for ses.Identity.publicHostedZone anymore Aug 25, 2023
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Aug 25, 2023
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 25, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 0ce6150
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit b5bd39e into aws:main Aug 25, 2023
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 25, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This issue is a bug. distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/medium Medium work item – several days of effort p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aws-route53: (BREAKING!) Imported Route53 zone attribute and/or type mismatch

3 participants