Skip to content

Conversation

@gasolima
Copy link
Contributor

Issue # (if applicable)

N/A

Reason for this change

When creating a Route53 RecordSet with an alias target, the ttl property is ignored since alias targets don't use TTL values.

Description of changes

This change adds a warning annotation to inform users when they provide a ttl value that will be ignored. This improves developer experience by making it clear when a provided configuration option has no effect, helping users avoid confusion and potential misconfigurations.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

Created a resource that triggers the warning as shown below, then linked my PR changes and ran $ cdk synth

    new ARecord(this, 'ARecord', {
      zone: hostedZone,
      recordName: 'api.dev.mydemo-domain-abc.net',
      target: RecordTarget.fromAlias( 
        new LoadBalancerTarget(alb),
      ),
      ttl: cdk.Duration.seconds(15),
      deleteExisting: true,
    });

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team May 22, 2025 13:55
@github-actions github-actions bot added the p2 label May 22, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 22, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@gasolima gasolima added the pr-linter/exempt-test The PR linter will not require test changes label May 22, 2025
Copy link
Contributor

@matboros matboros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add unit tests for your change

When creating a Route53 RecordSet with an alias target, the ttl property is ignored since alias targets don't use TTL values. This change adds a warning annotation to inform users when they provide a ttl value that will be ignored.
This improves developer experience by making it clear when a provided configuration option has no effect, helping users avoid confusion and potential misconfigurations.
@gasolima gasolima force-pushed the add-warning-ignoring-ttl branch from fff86a9 to 8f60c3c Compare June 11, 2025 12:51
@matboros matboros added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Jun 13, 2025
@matboros matboros assigned matboros and unassigned shikha372 Jun 13, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review June 13, 2025 12:13

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@mergify
Copy link
Contributor

mergify bot commented Jun 13, 2025

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
Collaborator

AWS CodeBuild CI Report

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

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

@mergify
Copy link
Contributor

mergify bot commented Jun 13, 2025

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).

@mergify mergify bot merged commit 993d2fd into aws:main Jun 13, 2025
16 checks passed
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-test The PR linter will not require test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants