(cli): cdk import requires SetIdentifier for AWS::Route53::RecordSet and skips import if omitted

未关闭
#2,001 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
aws, typescript
领域
cli, cloud

调研方向

Start with the linked reproduction and the cdk import flow for AWS::Route53::RecordSet, focusing on the SetIdentifier prompt. Verify behavior with a standard record that leaves SetIdentifier blank. Done means the prompt no longer skips the resource and change set creation succeeds without an arbitrary SetIdentifier.

由索引模型根据 Issue 内容生成。

描述

aws-cdk bug effort/small good first issue p2
Describe the bug

When attempting to import an existing AWS::Route53::RecordSet (e.g., A record or CNAME record) using cdk import, the interactive CLI prompt requires the SetIdentifier attribute to be specified.

Because SetIdentifier only exists for advanced routing policies and is not applicable to standard routing, it is an optional attribute. Despite this, leaving SetIdentifier empty during the prompt causes CDK to skip importing the resource entirely.

Regression Issue
  • Select this option if this issue appears to be a regression.
Last Known Working CDK Version

No response

Expected Behavior

SetIdentifier should be treated as optional. Leaving SetIdentifier blank should still allow change set creation (similar to the way Cloudformation imports via AWS Console work).

Current Behavior

SetIdentifier is non optional. If omitted, the resource import is skipped.

This is output from running cdk import and accepting all default values. (Some parts of the output are redacted)

👾 cdk:import | cdk import
start: Building aws-cdk-recreate-dev Template
success: Built aws-cdk-recreate-dev Template
start: Publishing aws-cdk-recreate-dev Template (******)
success: Published aws-cdk-recreate-dev Template ((******)
aws-cdk-recreate-dev/ImportedARecord/Resource (AWS::Route53::RecordSet): enter Name (******) 
aws-cdk-recreate-dev/ImportedARecord/Resource (AWS::Route53::RecordSet): enter HostedZoneId (******) 
aws-cdk-recreate-dev/ImportedARecord/Resource (AWS::Route53::RecordSet): enter Type (A) 
aws-cdk-recreate-dev/ImportedARecord/Resource (AWS::Route53::RecordSet): enter SetIdentifier (empty to skip) 
Skipping import of aws-cdk-recreate-dev/ImportedARecord/Resource
No resources selected for import.

If an arbitrary value is passed for SetIdentifier, change set creation fails since there is no matching Route 53 record with that SetIdentifier.

Reproduction Steps

https://github.com/ykageyama-mondo/aws-cdk-cli-import-issue-recreate

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.1143.0 (build 9c6bd0e)

Framework Version

No response

Node.js Version

v24.11.1

OS

EndeavourOS x86_64

Language

TypeScript

Language Version

6.0.3

Other information

No response

主要语言
TypeScript
星标
110
派生
138
平均合并
1 天 9 小时
30 天内合并 PR
55

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aws/aws-cdk-cli 的其他 Issue

查看 aws/aws-cdk-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。