cdk-real-drift 0.2.21 → 0.2.23

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
@@ -50,7 +50,7 @@ import { S_BAR, S_BAR_END, S_BAR_START, S_CHECKBOX_INACTIVE, S_CHECKBOX_SELECTED
50
50
  import pc from "picocolors";
51
51
  import { MultiSelectPrompt, Prompt, isCancel as isCancel$1 } from "@clack/core";
52
52
  import { CloudFrontClient, GetDistributionConfigCommand, UpdateDistributionCommand } from "@aws-sdk/client-cloudfront";
53
- import { DescribeSignalingChannelCommand, DescribeStreamCommand, KinesisVideoClient, UpdateDataRetentionCommand, UpdateSignalingChannelCommand } from "@aws-sdk/client-kinesis-video";
53
+ import { DescribeSignalingChannelCommand, DescribeStreamCommand, KinesisVideoClient, UpdateDataRetentionCommand, UpdateSignalingChannelCommand, UpdateStreamStorageConfigurationCommand } from "@aws-sdk/client-kinesis-video";
54
54
  import { DescribeDomainConfigCommand, OpenSearchClient, UpdateDomainConfigCommand } from "@aws-sdk/client-opensearch";
55
55
  import { GetWebACLCommand, UpdateWebACLCommand, WAFV2Client } from "@aws-sdk/client-wafv2";
56
56
  import { ConfigServiceClient, DescribeConfigRulesCommand, PutConfigRuleCommand } from "@aws-sdk/client-config-service";
@@ -3560,7 +3560,12 @@ const ELB_ATTRIBUTE_BAGS = {
3560
3560
  };
3561
3561
  const MEANINGFUL_WHEN_OFF = {
3562
3562
  "AWS::KMS::Key": { Enabled: () => true },
3563
- "AWS::SQS::Queue": { SqsManagedSseEnabled: ({ declared, live }) => declared["KmsMasterKeyId"] === void 0 && live["KmsMasterKeyId"] === void 0 }
3563
+ "AWS::SQS::Queue": { SqsManagedSseEnabled: ({ declared, live }) => declared["KmsMasterKeyId"] === void 0 && live["KmsMasterKeyId"] === void 0 },
3564
+ "AWS::EC2::VPC": { EnableDnsSupport: () => true },
3565
+ "AWS::EC2::Instance": { SourceDestCheck: () => true },
3566
+ "AWS::EC2::NetworkInterface": { SourceDestCheck: () => true },
3567
+ "AWS::Cognito::UserPoolClient": { EnableTokenRevocation: () => true },
3568
+ "AWS::CloudWatch::CompositeAlarm": { ActionsEnabled: () => true }
3564
3569
  };
3565
3570
  const stripCognitoAttrPrefix = (id) => id.replace(/^(custom|dev):/, "");
3566
3571
  const IDENTITY_KEYED_SUBSET_ARRAYS = {
@@ -10269,6 +10274,22 @@ const writeKinesisVideoSignalingChannel = async (ctx, ops) => {
10269
10274
  SingleMasterConfiguration: { MessageTtlSeconds: target }
10270
10275
  }));
10271
10276
  };
10277
+ const KVS_STREAM_STORAGE_TIER_DEFAULT = "HOT";
10278
+ const writeKinesisVideoStreamStorage = async (ctx, ops) => {
10279
+ const id = str(ctx.physicalId) ?? str(ctx.declared["Name"]);
10280
+ if (!id) throw new Error("cannot resolve Kinesis Video stream for revert");
10281
+ const op = ops.find((o) => o.path.replace(/^\//, "").replace(/\//g, ".").endsWith("DefaultStorageTier"));
10282
+ if (!op) return;
10283
+ const target = op.op === "add" && typeof op.value === "string" ? op.value : KVS_STREAM_STORAGE_TIER_DEFAULT;
10284
+ const kv = new KinesisVideoClient({ region: ctx.region });
10285
+ const version = (await kv.send(new DescribeStreamCommand(kvsStreamRef(id)))).StreamInfo?.Version;
10286
+ if (version === void 0) throw new Error(`cannot resolve stream version for ${id}`);
10287
+ await kv.send(new UpdateStreamStorageConfigurationCommand({
10288
+ ...kvsStreamRef(id),
10289
+ CurrentVersion: version,
10290
+ StreamStorageConfiguration: { DefaultStorageTier: target }
10291
+ }));
10292
+ };
10272
10293
  const SDK_WRITERS = {
10273
10294
  "AWS::ElasticBeanstalk::Application": writeElasticBeanstalkApplication,
10274
10295
  "AWS::ElasticBeanstalk::Environment": writeElasticBeanstalkEnvironment,
@@ -10371,6 +10392,10 @@ const SDK_NESTED_WRITERS = {
10371
10392
  match: isApiGatewayMethodKnobPath,
10372
10393
  writer: writeApiGatewayMethod
10373
10394
  },
10395
+ "AWS::KinesisVideo::Stream": {
10396
+ match: (p) => p === "StreamStorageConfiguration" || p.startsWith("StreamStorageConfiguration."),
10397
+ writer: writeKinesisVideoStreamStorage
10398
+ },
10374
10399
  "AWS::ECS::Service": {
10375
10400
  match: (p) => p === "ServiceConnectConfiguration" || p.startsWith("ServiceConnectConfiguration.") || p === "VolumeConfigurations" || p.startsWith("VolumeConfigurations.") || p.startsWith("VolumeConfigurations["),
10376
10401
  writer: writeEcsServiceWriteOnlyProps
@@ -10433,7 +10458,8 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
10433
10458
  "AWS::Cognito::UserPool\0UserPoolTier",
10434
10459
  "AWS::SNS::Subscription\0FilterPolicyScope",
10435
10460
  "AWS::InternetMonitor::Monitor\0Status",
10436
- "AWS::RolesAnywhere::Profile\0DurationSeconds"
10461
+ "AWS::RolesAnywhere::Profile\0DurationSeconds",
10462
+ "AWS::RolesAnywhere::Profile\0AttributeMappings"
10437
10463
  ]);
10438
10464
  /**
10439
10465
  * A nested undeclared value (a live sub-key inside a declared object, R96/R98) — a dotted