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

オープン
#2,001 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
55

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/aws-cdk-cli のほかの issue

aws/aws-cdk-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。