Skip to content

Commit 41d4297

Browse files
committed
setId before throwing exception for dynamoImportFailure for tainting
Otherwise the table would get created but state won't manage it which would then require manual intervention to fix.
1 parent 6bba6ee commit 41d4297

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/service/dynamodb/table.go

+1
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ func resourceTableCreate(ctx context.Context, d *schema.ResourceData, meta inter
624624

625625
importArn := importTableOutput.(*dynamodb.ImportTableOutput).ImportTableDescription.ImportArn
626626
if _, err = waitImportComplete(ctx, conn, *importArn, d.Timeout(schema.TimeoutCreate)); err != nil {
627+
d.SetId(tableName)
627628
return create.AppendDiagError(diags, names.DynamoDB, create.ErrActionCreating, ResNameTable, d.Id(), err)
628629
}
629630
} else {

0 commit comments

Comments
 (0)