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

Abierto
#2,001 5 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
aws, typescript
Área
cli, cloud

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
110
Forks
138
Merge medio
1 d 9 h
PR fusionados (30 d)
55

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de aws/aws-cdk-cli

Todos los issues de aws/aws-cdk-cli

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.