@go-to-k/cdkd 0.102.6 → 0.102.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +35 -12
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -16698,18 +16698,41 @@ var RDSProvider = class {
|
|
|
16698
16698
|
...tags.length > 0 && { Tags: tags }
|
|
16699
16699
|
}))).DBCluster) throw new Error("CreateDBCluster did not return DBCluster");
|
|
16700
16700
|
this.logger.debug(`Successfully created DBCluster ${logicalId}: ${dbClusterIdentifier}`);
|
|
16701
|
-
|
|
16702
|
-
|
|
16703
|
-
|
|
16704
|
-
|
|
16705
|
-
|
|
16706
|
-
|
|
16707
|
-
|
|
16708
|
-
|
|
16709
|
-
|
|
16710
|
-
|
|
16701
|
+
const wantsDeletionProtection = properties["DeletionProtection"] === true;
|
|
16702
|
+
try {
|
|
16703
|
+
if (process.env["CDKD_NO_WAIT"] !== "true") await this.waitForClusterAvailable(dbClusterIdentifier);
|
|
16704
|
+
const described = await this.describeDBCluster(dbClusterIdentifier);
|
|
16705
|
+
return {
|
|
16706
|
+
physicalId: dbClusterIdentifier,
|
|
16707
|
+
attributes: {
|
|
16708
|
+
"Endpoint.Address": described?.Endpoint ?? "",
|
|
16709
|
+
"Endpoint.Port": String(described?.Port ?? ""),
|
|
16710
|
+
"ReadEndpoint.Address": described?.ReaderEndpoint ?? "",
|
|
16711
|
+
Arn: described?.DBClusterArn ?? "",
|
|
16712
|
+
DBClusterResourceId: described?.DbClusterResourceId ?? ""
|
|
16713
|
+
}
|
|
16714
|
+
};
|
|
16715
|
+
} catch (innerError) {
|
|
16716
|
+
try {
|
|
16717
|
+
if (wantsDeletionProtection) try {
|
|
16718
|
+
await this.getClient().send(new ModifyDBClusterCommand({
|
|
16719
|
+
DBClusterIdentifier: dbClusterIdentifier,
|
|
16720
|
+
DeletionProtection: false,
|
|
16721
|
+
ApplyImmediately: true
|
|
16722
|
+
}));
|
|
16723
|
+
} catch (disableError) {
|
|
16724
|
+
this.logger.debug(`Could not disable DeletionProtection on partially-created DBCluster ${dbClusterIdentifier}: ${disableError instanceof Error ? disableError.message : String(disableError)} (proceeding with DeleteDBCluster anyway)`);
|
|
16725
|
+
}
|
|
16726
|
+
await this.getClient().send(new DeleteDBClusterCommand({
|
|
16727
|
+
DBClusterIdentifier: dbClusterIdentifier,
|
|
16728
|
+
SkipFinalSnapshot: true
|
|
16729
|
+
}));
|
|
16730
|
+
this.logger.debug(`Delete requested for partially-created DBCluster ${logicalId} (${dbClusterIdentifier}) after wiring failure (not waiting for deleted state)`);
|
|
16731
|
+
} catch (cleanupError) {
|
|
16732
|
+
this.logger.warn(`Failed to delete partially-created DBCluster ${logicalId} (${dbClusterIdentifier}): ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}. THE CLUSTER IS STILL RUNNING AND BILLING. Manual cleanup required: ${wantsDeletionProtection ? `aws rds modify-db-cluster --db-cluster-identifier ${dbClusterIdentifier} --no-deletion-protection --apply-immediately; ` : ""}aws rds delete-db-cluster --db-cluster-identifier ${dbClusterIdentifier} --skip-final-snapshot`);
|
|
16711
16733
|
}
|
|
16712
|
-
|
|
16734
|
+
throw innerError;
|
|
16735
|
+
}
|
|
16713
16736
|
} catch (error) {
|
|
16714
16737
|
if (error instanceof ProvisioningError) throw error;
|
|
16715
16738
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -42909,7 +42932,7 @@ function reorderArgs(argv) {
|
|
|
42909
42932
|
*/
|
|
42910
42933
|
async function main() {
|
|
42911
42934
|
const program = new Command();
|
|
42912
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.102.
|
|
42935
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.102.7");
|
|
42913
42936
|
program.addCommand(createBootstrapCommand());
|
|
42914
42937
|
program.addCommand(createSynthCommand());
|
|
42915
42938
|
program.addCommand(createListCommand());
|