@go-to-k/cdkd 0.230.25 → 0.230.27

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
@@ -20,7 +20,7 @@ import { CreateSecretCommand, DeleteSecretCommand, DescribeSecretCommand, GetSec
20
20
  import { AddTagsToResourceCommand, DeleteParameterCommand, DescribeParametersCommand, GetParameterCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$2, ParameterNotFound, PutParameterCommand, RemoveTagsFromResourceCommand, SSMClient } from "@aws-sdk/client-ssm";
21
21
  import { CloudFrontClient, CreateCloudFrontOriginAccessIdentityCommand, CreateDistributionCommand, CreateDistributionWithTagsCommand, DeleteCloudFrontOriginAccessIdentityCommand, DeleteDistributionCommand, GetCloudFrontOriginAccessIdentityCommand, GetDistributionCommand, GetDistributionConfigCommand, ListDistributionsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$3, NoSuchCloudFrontOriginAccessIdentity, NoSuchDistribution, TagResourceCommand as TagResourceCommand$6, UntagResourceCommand as UntagResourceCommand$6, UpdateCloudFrontOriginAccessIdentityCommand, UpdateDistributionCommand } from "@aws-sdk/client-cloudfront";
22
22
  import { CloudWatchClient, DeleteAlarmsCommand, DescribeAlarmsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$4, PutMetricAlarmCommand, TagResourceCommand as TagResourceCommand$7, UntagResourceCommand as UntagResourceCommand$7 } from "@aws-sdk/client-cloudwatch";
23
- import { CloudWatchLogsClient, CreateLogGroupCommand, DeleteDataProtectionPolicyCommand, DeleteIndexPolicyCommand, DeleteLogGroupCommand, DeleteRetentionPolicyCommand, DescribeIndexPoliciesCommand, DescribeLogGroupsCommand, GetDataProtectionPolicyCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$5, PutBearerTokenAuthenticationCommand, PutDataProtectionPolicyCommand, PutIndexPolicyCommand, PutLogGroupDeletionProtectionCommand, PutRetentionPolicyCommand, ResourceAlreadyExistsException, ResourceNotFoundException as ResourceNotFoundException$4, TagResourceCommand as TagResourceCommand$8, UntagResourceCommand as UntagResourceCommand$8 } from "@aws-sdk/client-cloudwatch-logs";
23
+ import { AssociateKmsKeyCommand, CloudWatchLogsClient, CreateLogGroupCommand, DeleteDataProtectionPolicyCommand, DeleteIndexPolicyCommand, DeleteLogGroupCommand, DeleteRetentionPolicyCommand, DescribeIndexPoliciesCommand, DescribeLogGroupsCommand, DisassociateKmsKeyCommand, GetDataProtectionPolicyCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$5, PutBearerTokenAuthenticationCommand, PutDataProtectionPolicyCommand, PutIndexPolicyCommand, PutLogGroupDeletionProtectionCommand, PutRetentionPolicyCommand, ResourceAlreadyExistsException, ResourceNotFoundException as ResourceNotFoundException$4, TagResourceCommand as TagResourceCommand$8, UntagResourceCommand as UntagResourceCommand$8 } from "@aws-sdk/client-cloudwatch-logs";
24
24
  import { BedrockAgentCoreControlClient, CreateAgentRuntimeCommand, DeleteAgentRuntimeCommand, GetAgentRuntimeCommand, ResourceNotFoundException as ResourceNotFoundException$5, UpdateAgentRuntimeCommand } from "@aws-sdk/client-bedrock-agentcore-control";
25
25
  import { ACMClient, AddTagsToCertificateCommand, DeleteCertificateCommand, DescribeCertificateCommand, ListCertificatesCommand, ListTagsForCertificateCommand, RemoveTagsFromCertificateCommand, RequestCertificateCommand, ResourceNotFoundException as ResourceNotFoundException$6, UpdateCertificateOptionsCommand } from "@aws-sdk/client-acm";
26
26
  import * as fs from "node:fs";
@@ -1445,7 +1445,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1445
1445
  const FLUSH_EVENT_THRESHOLD = 50;
1446
1446
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1447
1447
  function getCdkdVersion() {
1448
- return "0.230.25";
1448
+ return "0.230.27";
1449
1449
  }
1450
1450
  /**
1451
1451
  * Generate a time-sortable unique run id, e.g.
@@ -12228,11 +12228,29 @@ var LogsLogGroupProvider = class {
12228
12228
  *
12229
12229
  * Mutable: `RetentionInDays`, `DataProtectionPolicy`, `Tags`,
12230
12230
  * `DeletionProtectionEnabled`, `BearerTokenAuthenticationEnabled`,
12231
- * `FieldIndexPolicies`. `LogGroupName` / `KmsKeyId` / `LogGroupClass`
12232
- * are immutable on AWS-side and require replacement.
12231
+ * `FieldIndexPolicies`, `KmsKeyId` (via AssociateKmsKey /
12232
+ * DisassociateKmsKey). `LogGroupName` requires replacement.
12233
+ * `LogGroupClass` cannot be changed at all (CFn: "Updates are not
12234
+ * supported" — there is no CloudWatch Logs API to change a log group's
12235
+ * class after creation), so a class change throws
12236
+ * {@link ResourceUpdateNotSupportedError} instead of being silently
12237
+ * dropped; `--replace` recreates the log group under the new class.
12233
12238
  */
12234
12239
  async update(logicalId, physicalId, _resourceType, properties, previousProperties) {
12235
12240
  this.logger.debug(`Updating log group ${logicalId}: ${physicalId}`);
12241
+ const normalizeClass = (v) => typeof v === "string" && v.length > 0 ? v : "STANDARD";
12242
+ const prevClass = normalizeClass(previousProperties["LogGroupClass"]);
12243
+ const nextClass = normalizeClass(properties["LogGroupClass"]);
12244
+ if (prevClass !== nextClass) throw new ResourceUpdateNotSupportedError("AWS::Logs::LogGroup", logicalId, `the LogGroupClass ('${prevClass}' -> '${nextClass}') cannot be changed after creation. Re-deploy with ${properties["RetentionInDays"] ? "--replace --force-stateful-recreation" : "--replace"} to delete + recreate the log group under the new class (its stored log events are lost), or revert the LogGroupClass change`);
12245
+ const newKmsKeyId = properties["KmsKeyId"];
12246
+ if (newKmsKeyId !== previousProperties["KmsKeyId"]) {
12247
+ if (newKmsKeyId) await this.logsClient.send(new AssociateKmsKeyCommand({
12248
+ logGroupName: physicalId,
12249
+ kmsKeyId: newKmsKeyId
12250
+ }));
12251
+ else await this.logsClient.send(new DisassociateKmsKeyCommand({ logGroupName: physicalId }));
12252
+ this.logger.debug(`Updated KMS key association for log group ${physicalId}`);
12253
+ }
12236
12254
  const retentionInDays = properties["RetentionInDays"];
12237
12255
  if (retentionInDays !== previousProperties["RetentionInDays"]) if (retentionInDays) await this.logsClient.send(new PutRetentionPolicyCommand({
12238
12256
  logGroupName: physicalId,
@@ -55412,7 +55430,7 @@ function reorderArgs(argv) {
55412
55430
  async function main() {
55413
55431
  installPipeCloseHandler();
55414
55432
  const program = new Command();
55415
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.230.25");
55433
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.230.27");
55416
55434
  program.addCommand(createBootstrapCommand());
55417
55435
  program.addCommand(createSynthCommand());
55418
55436
  program.addCommand(createListCommand());