@go-to-k/cdkd 0.218.0 → 0.219.1
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-DWUnLza1.js";
|
|
3
|
-
import { $ as CFN_TEMPLATE_URL_LIMIT, A as DagBuilder, B as getDockerCmd, C as CloudControlProvider, D as IntrinsicFunctionResolver, Dt as withErrorHandling, E as isTerminationProtectionPropagationError, Et as normalizeAwsError, F as AssetPublisher, Ft as generateResourceName, G as getLegacyStateBucketName, H as runDockerStreaming, I as stringifyValue, It as generateResourceNameWithFallback, J as resolveSkipPrefix, K as resolveApp, L as WorkGraph, Lt as withSkipPrefix, M as LockManager, Mt as getLiveRenderer, N as S3StateBackend, Nt as PATTERN_B_NAME_PROPERTIES, O as applyRoleArnIfSet, P as shouldRetainResource, Pt as PATTERN_B_RESOURCE_TYPES, Q as CFN_TEMPLATE_BODY_LIMIT, R as buildDockerImage, Rt as withStackName, S as findActionableSilentDrops, T as disableInstanceApiTermination, U as Synthesizer, V as runDockerForeground, W as getDefaultStateBucketName, X as resolveStateBucketWithDefaultAndSource, Y as resolveStateBucketWithDefault, Z as warnDeprecatedNoPrefixCliFlag, _ as CDK_PATH_TAG, _t as ProvisioningError, a as withRetry, at as resolveBucketRegion, b as resolveExplicitPhysicalId, bt as StackHasActiveImportsError, c as formatResourceLine, d as gray, dt as LocalMigrateError, et as MIGRATE_TMP_PREFIX, f as green, ft as LocalStartServiceError, g as collectInlinePolicyNamesManagedBySiblings, gt as PartialFailureError, h as IAMRoleProvider, ht as NestedStackChildDirectDestroyError, i as withResourceDeadline, j as TemplateParser, jt as runStackBuffered, k as DiffCalculator, kt as getLogger, l as bold, m as yellow, mt as MissingCdkCliError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as uploadCfnTemplate, o as isRetryableTransientError, p as red, q as resolveCaptureObservedState, r as DeployEngine, rt as AssemblyReader, s as IMPLICIT_DELETE_DEPENDENCIES, st as CdkdError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as findLargeInlineResources, u as cyan, ut as LocalInvokeBuildError$1, v as matchesCdkPath, vt as ResourceTimeoutError, w as assertRegionMatch, x as ProviderRegistry, xt as StackTerminationProtectionError, y as normalizeAwsTagsToCfn, yt as ResourceUpdateNotSupportedError, z as formatDockerLoginError } from "./deploy-engine-
|
|
3
|
+
import { $ as CFN_TEMPLATE_URL_LIMIT, A as DagBuilder, B as getDockerCmd, C as CloudControlProvider, D as IntrinsicFunctionResolver, Dt as withErrorHandling, E as isTerminationProtectionPropagationError, Et as normalizeAwsError, F as AssetPublisher, Ft as generateResourceName, G as getLegacyStateBucketName, H as runDockerStreaming, I as stringifyValue, It as generateResourceNameWithFallback, J as resolveSkipPrefix, K as resolveApp, L as WorkGraph, Lt as withSkipPrefix, M as LockManager, Mt as getLiveRenderer, N as S3StateBackend, Nt as PATTERN_B_NAME_PROPERTIES, O as applyRoleArnIfSet, P as shouldRetainResource, Pt as PATTERN_B_RESOURCE_TYPES, Q as CFN_TEMPLATE_BODY_LIMIT, R as buildDockerImage, Rt as withStackName, S as findActionableSilentDrops, T as disableInstanceApiTermination, U as Synthesizer, V as runDockerForeground, W as getDefaultStateBucketName, X as resolveStateBucketWithDefaultAndSource, Y as resolveStateBucketWithDefault, Z as warnDeprecatedNoPrefixCliFlag, _ as CDK_PATH_TAG, _t as ProvisioningError, a as withRetry, at as resolveBucketRegion, b as resolveExplicitPhysicalId, bt as StackHasActiveImportsError, c as formatResourceLine, d as gray, dt as LocalMigrateError, et as MIGRATE_TMP_PREFIX, f as green, ft as LocalStartServiceError, g as collectInlinePolicyNamesManagedBySiblings, gt as PartialFailureError, h as IAMRoleProvider, ht as NestedStackChildDirectDestroyError, i as withResourceDeadline, j as TemplateParser, jt as runStackBuffered, k as DiffCalculator, kt as getLogger, l as bold, m as yellow, mt as MissingCdkCliError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as uploadCfnTemplate, o as isRetryableTransientError, p as red, q as resolveCaptureObservedState, r as DeployEngine, rt as AssemblyReader, s as IMPLICIT_DELETE_DEPENDENCIES, st as CdkdError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as findLargeInlineResources, u as cyan, ut as LocalInvokeBuildError$1, v as matchesCdkPath, vt as ResourceTimeoutError, w as assertRegionMatch, x as ProviderRegistry, xt as StackTerminationProtectionError, y as normalizeAwsTagsToCfn, yt as ResourceUpdateNotSupportedError, z as formatDockerLoginError } from "./deploy-engine-B6CuzOHi.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
6
6
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListDirectoryBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -20267,7 +20267,13 @@ var RDSProvider = class {
|
|
|
20267
20267
|
"BackupRetentionPeriod",
|
|
20268
20268
|
"DeletionProtection",
|
|
20269
20269
|
"ServerlessV2ScalingConfiguration",
|
|
20270
|
-
"Tags"
|
|
20270
|
+
"Tags",
|
|
20271
|
+
"ManageMasterUserPassword",
|
|
20272
|
+
"MasterUserSecret",
|
|
20273
|
+
"MonitoringRoleArn",
|
|
20274
|
+
"MonitoringInterval",
|
|
20275
|
+
"EnableIAMDatabaseAuthentication",
|
|
20276
|
+
"PubliclyAccessible"
|
|
20271
20277
|
])],
|
|
20272
20278
|
["AWS::RDS::DBInstance", new Set([
|
|
20273
20279
|
"DBInstanceIdentifier",
|
|
@@ -20284,7 +20290,13 @@ var RDSProvider = class {
|
|
|
20284
20290
|
"MasterUserPassword",
|
|
20285
20291
|
"Port",
|
|
20286
20292
|
"StorageEncrypted",
|
|
20287
|
-
"VPCSecurityGroups"
|
|
20293
|
+
"VPCSecurityGroups",
|
|
20294
|
+
"KmsKeyId",
|
|
20295
|
+
"MasterUserSecret",
|
|
20296
|
+
"ManageMasterUserPassword",
|
|
20297
|
+
"MonitoringRoleArn",
|
|
20298
|
+
"MonitoringInterval",
|
|
20299
|
+
"EnableIAMDatabaseAuthentication"
|
|
20288
20300
|
])]
|
|
20289
20301
|
]);
|
|
20290
20302
|
unhandledByDesign = new Map([["AWS::RDS::DBCluster", new Map([["DeleteAutomatedBackups", "cdkd hardcodes SkipFinalSnapshot=true on destroy; this CFn lifecycle flag has no equivalent on the runtime path"]])], ["AWS::RDS::DBInstance", new Map([
|
|
@@ -20392,6 +20404,7 @@ var RDSProvider = class {
|
|
|
20392
20404
|
try {
|
|
20393
20405
|
const tags = this.buildTags(properties);
|
|
20394
20406
|
const serverlessV2Config = properties["ServerlessV2ScalingConfiguration"];
|
|
20407
|
+
const masterUserSecret = properties["MasterUserSecret"];
|
|
20395
20408
|
if (!(await this.getClient().send(new CreateDBClusterCommand({
|
|
20396
20409
|
DBClusterIdentifier: dbClusterIdentifier,
|
|
20397
20410
|
Engine: properties["Engine"],
|
|
@@ -20406,6 +20419,12 @@ var RDSProvider = class {
|
|
|
20406
20419
|
KmsKeyId: properties["KmsKeyId"],
|
|
20407
20420
|
BackupRetentionPeriod: properties["BackupRetentionPeriod"] != null ? Number(properties["BackupRetentionPeriod"]) : void 0,
|
|
20408
20421
|
DeletionProtection: properties["DeletionProtection"],
|
|
20422
|
+
...properties["ManageMasterUserPassword"] !== void 0 && { ManageMasterUserPassword: properties["ManageMasterUserPassword"] },
|
|
20423
|
+
...masterUserSecret?.KmsKeyId !== void 0 && { MasterUserSecretKmsKeyId: masterUserSecret.KmsKeyId },
|
|
20424
|
+
...properties["MonitoringRoleArn"] !== void 0 && { MonitoringRoleArn: properties["MonitoringRoleArn"] },
|
|
20425
|
+
...properties["MonitoringInterval"] !== void 0 && { MonitoringInterval: Number(properties["MonitoringInterval"]) },
|
|
20426
|
+
...properties["EnableIAMDatabaseAuthentication"] !== void 0 && { EnableIAMDatabaseAuthentication: properties["EnableIAMDatabaseAuthentication"] },
|
|
20427
|
+
...properties["PubliclyAccessible"] !== void 0 && { PubliclyAccessible: properties["PubliclyAccessible"] },
|
|
20409
20428
|
...serverlessV2Config && { ServerlessV2ScalingConfiguration: {
|
|
20410
20429
|
MinCapacity: serverlessV2Config.MinCapacity,
|
|
20411
20430
|
MaxCapacity: serverlessV2Config.MaxCapacity
|
|
@@ -20461,6 +20480,7 @@ var RDSProvider = class {
|
|
|
20461
20480
|
const hasServerlessV2 = serverlessV2Config !== void 0 && (serverlessV2Config.MinCapacity !== void 0 || serverlessV2Config.MaxCapacity !== void 0);
|
|
20462
20481
|
const vpcSgIds = properties["VpcSecurityGroupIds"];
|
|
20463
20482
|
const sendVpcSgIds = vpcSgIds !== void 0 && vpcSgIds.length > 0;
|
|
20483
|
+
const masterUserSecret = properties["MasterUserSecret"];
|
|
20464
20484
|
await this.getClient().send(new ModifyDBClusterCommand({
|
|
20465
20485
|
DBClusterIdentifier: physicalId,
|
|
20466
20486
|
EngineVersion: properties["EngineVersion"],
|
|
@@ -20469,6 +20489,11 @@ var RDSProvider = class {
|
|
|
20469
20489
|
...sendVpcSgIds && { VpcSecurityGroupIds: vpcSgIds },
|
|
20470
20490
|
MasterUserPassword: properties["MasterUserPassword"],
|
|
20471
20491
|
Port: properties["Port"] != null ? Number(properties["Port"]) : void 0,
|
|
20492
|
+
...properties["ManageMasterUserPassword"] !== void 0 && { ManageMasterUserPassword: properties["ManageMasterUserPassword"] },
|
|
20493
|
+
...masterUserSecret?.KmsKeyId !== void 0 && { MasterUserSecretKmsKeyId: masterUserSecret.KmsKeyId },
|
|
20494
|
+
...properties["MonitoringRoleArn"] !== void 0 && { MonitoringRoleArn: properties["MonitoringRoleArn"] },
|
|
20495
|
+
...properties["MonitoringInterval"] !== void 0 && { MonitoringInterval: Number(properties["MonitoringInterval"]) },
|
|
20496
|
+
...properties["EnableIAMDatabaseAuthentication"] !== void 0 && { EnableIAMDatabaseAuthentication: properties["EnableIAMDatabaseAuthentication"] },
|
|
20472
20497
|
...hasServerlessV2 && { ServerlessV2ScalingConfiguration: {
|
|
20473
20498
|
MinCapacity: serverlessV2Config.MinCapacity,
|
|
20474
20499
|
MaxCapacity: serverlessV2Config.MaxCapacity
|
|
@@ -20531,6 +20556,7 @@ var RDSProvider = class {
|
|
|
20531
20556
|
});
|
|
20532
20557
|
try {
|
|
20533
20558
|
const tags = this.buildTags(properties);
|
|
20559
|
+
const masterUserSecret = properties["MasterUserSecret"];
|
|
20534
20560
|
if (!(await this.getClient().send(new CreateDBInstanceCommand({
|
|
20535
20561
|
DBInstanceIdentifier: dbInstanceIdentifier,
|
|
20536
20562
|
DBInstanceClass: properties["DBInstanceClass"],
|
|
@@ -20546,6 +20572,12 @@ var RDSProvider = class {
|
|
|
20546
20572
|
...properties["MasterUserPassword"] !== void 0 && { MasterUserPassword: properties["MasterUserPassword"] },
|
|
20547
20573
|
...properties["StorageEncrypted"] !== void 0 && { StorageEncrypted: properties["StorageEncrypted"] },
|
|
20548
20574
|
...properties["VPCSecurityGroups"] !== void 0 && { VpcSecurityGroupIds: properties["VPCSecurityGroups"] },
|
|
20575
|
+
...properties["KmsKeyId"] !== void 0 && { KmsKeyId: properties["KmsKeyId"] },
|
|
20576
|
+
...masterUserSecret?.KmsKeyId !== void 0 && { MasterUserSecretKmsKeyId: masterUserSecret.KmsKeyId },
|
|
20577
|
+
...properties["ManageMasterUserPassword"] !== void 0 && { ManageMasterUserPassword: properties["ManageMasterUserPassword"] },
|
|
20578
|
+
...properties["MonitoringRoleArn"] !== void 0 && { MonitoringRoleArn: properties["MonitoringRoleArn"] },
|
|
20579
|
+
...properties["MonitoringInterval"] !== void 0 && { MonitoringInterval: Number(properties["MonitoringInterval"]) },
|
|
20580
|
+
...properties["EnableIAMDatabaseAuthentication"] !== void 0 && { EnableIAMDatabaseAuthentication: properties["EnableIAMDatabaseAuthentication"] },
|
|
20549
20581
|
...tags.length > 0 && { Tags: tags }
|
|
20550
20582
|
}))).DBInstance) throw new Error("CreateDBInstance did not return DBInstance");
|
|
20551
20583
|
this.logger.debug(`Successfully created DBInstance ${logicalId}: ${dbInstanceIdentifier}`);
|
|
@@ -20571,6 +20603,7 @@ var RDSProvider = class {
|
|
|
20571
20603
|
const newEngineVersion = properties["EngineVersion"];
|
|
20572
20604
|
const prevEngineVersion = previousProperties["EngineVersion"];
|
|
20573
20605
|
const allowMajorVersionUpgrade = newEngineVersion !== void 0 && newEngineVersion !== prevEngineVersion && prevEngineVersion !== void 0 && newEngineVersion.split(".")[0] !== prevEngineVersion.split(".")[0];
|
|
20606
|
+
const masterUserSecret = properties["MasterUserSecret"];
|
|
20574
20607
|
await this.getClient().send(new ModifyDBInstanceCommand({
|
|
20575
20608
|
DBInstanceIdentifier: physicalId,
|
|
20576
20609
|
DBInstanceClass: properties["DBInstanceClass"],
|
|
@@ -20584,7 +20617,12 @@ var RDSProvider = class {
|
|
|
20584
20617
|
},
|
|
20585
20618
|
...properties["Port"] !== void 0 && { DBPortNumber: Number(properties["Port"]) },
|
|
20586
20619
|
...properties["MasterUserPassword"] !== void 0 && { MasterUserPassword: properties["MasterUserPassword"] },
|
|
20587
|
-
...properties["VPCSecurityGroups"] !== void 0 && { VpcSecurityGroupIds: properties["VPCSecurityGroups"] }
|
|
20620
|
+
...properties["VPCSecurityGroups"] !== void 0 && { VpcSecurityGroupIds: properties["VPCSecurityGroups"] },
|
|
20621
|
+
...masterUserSecret?.KmsKeyId !== void 0 && { MasterUserSecretKmsKeyId: masterUserSecret.KmsKeyId },
|
|
20622
|
+
...properties["ManageMasterUserPassword"] !== void 0 && { ManageMasterUserPassword: properties["ManageMasterUserPassword"] },
|
|
20623
|
+
...properties["MonitoringRoleArn"] !== void 0 && { MonitoringRoleArn: properties["MonitoringRoleArn"] },
|
|
20624
|
+
...properties["MonitoringInterval"] !== void 0 && { MonitoringInterval: Number(properties["MonitoringInterval"]) },
|
|
20625
|
+
...properties["EnableIAMDatabaseAuthentication"] !== void 0 && { EnableIAMDatabaseAuthentication: properties["EnableIAMDatabaseAuthentication"] }
|
|
20588
20626
|
}));
|
|
20589
20627
|
this.logger.debug(`Successfully updated DBInstance ${logicalId}`);
|
|
20590
20628
|
const described = await this.describeDBInstance(physicalId);
|
|
@@ -20825,6 +20863,11 @@ var RDSProvider = class {
|
|
|
20825
20863
|
if (inst.StorageEncrypted !== void 0) result["StorageEncrypted"] = inst.StorageEncrypted;
|
|
20826
20864
|
const sgIds = (inst.VpcSecurityGroups ?? []).map((sg) => sg.VpcSecurityGroupId).filter((id) => !!id);
|
|
20827
20865
|
if (sgIds.length > 0) result["VPCSecurityGroups"] = sgIds;
|
|
20866
|
+
if (inst.KmsKeyId !== void 0) result["KmsKeyId"] = inst.KmsKeyId;
|
|
20867
|
+
if (inst.MonitoringRoleArn !== void 0) result["MonitoringRoleArn"] = inst.MonitoringRoleArn;
|
|
20868
|
+
if (inst.MonitoringInterval !== void 0) result["MonitoringInterval"] = inst.MonitoringInterval;
|
|
20869
|
+
if (inst.IAMDatabaseAuthenticationEnabled !== void 0) result["EnableIAMDatabaseAuthentication"] = inst.IAMDatabaseAuthenticationEnabled;
|
|
20870
|
+
if (inst.MasterUserSecret?.KmsKeyId !== void 0) result["MasterUserSecret"] = { KmsKeyId: inst.MasterUserSecret.KmsKeyId };
|
|
20828
20871
|
if (inst.DBInstanceArn) await this.attachTags(result, inst.DBInstanceArn);
|
|
20829
20872
|
return result;
|
|
20830
20873
|
}
|
|
@@ -20850,6 +20893,11 @@ var RDSProvider = class {
|
|
|
20850
20893
|
if (cluster.KmsKeyId !== void 0) result["KmsKeyId"] = cluster.KmsKeyId;
|
|
20851
20894
|
if (cluster.BackupRetentionPeriod !== void 0) result["BackupRetentionPeriod"] = cluster.BackupRetentionPeriod;
|
|
20852
20895
|
if (cluster.DeletionProtection !== void 0) result["DeletionProtection"] = cluster.DeletionProtection;
|
|
20896
|
+
if (cluster.MonitoringRoleArn !== void 0) result["MonitoringRoleArn"] = cluster.MonitoringRoleArn;
|
|
20897
|
+
if (cluster.MonitoringInterval !== void 0) result["MonitoringInterval"] = cluster.MonitoringInterval;
|
|
20898
|
+
if (cluster.IAMDatabaseAuthenticationEnabled !== void 0) result["EnableIAMDatabaseAuthentication"] = cluster.IAMDatabaseAuthenticationEnabled;
|
|
20899
|
+
if (cluster.PubliclyAccessible !== void 0) result["PubliclyAccessible"] = cluster.PubliclyAccessible;
|
|
20900
|
+
if (cluster.MasterUserSecret?.KmsKeyId !== void 0) result["MasterUserSecret"] = { KmsKeyId: cluster.MasterUserSecret.KmsKeyId };
|
|
20853
20901
|
if (cluster.ServerlessV2ScalingConfiguration?.MinCapacity !== void 0 || cluster.ServerlessV2ScalingConfiguration?.MaxCapacity !== void 0) {
|
|
20854
20902
|
const sc = {};
|
|
20855
20903
|
if (cluster.ServerlessV2ScalingConfiguration?.MinCapacity !== void 0) sc["MinCapacity"] = cluster.ServerlessV2ScalingConfiguration.MinCapacity;
|
|
@@ -53474,7 +53522,7 @@ function reorderArgs(argv) {
|
|
|
53474
53522
|
async function main() {
|
|
53475
53523
|
installPipeCloseHandler();
|
|
53476
53524
|
const program = new Command();
|
|
53477
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
53525
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.219.1");
|
|
53478
53526
|
program.addCommand(createBootstrapCommand());
|
|
53479
53527
|
program.addCommand(createSynthCommand());
|
|
53480
53528
|
program.addCommand(createListCommand());
|