cdk-real-drift 0.2.22 → 0.2.24

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";
@@ -1778,7 +1778,17 @@ const KNOWN_DEFAULT_PATHS = {
1778
1778
  "AttributeMapping.username": "sub"
1779
1779
  },
1780
1780
  "AWS::ApiGateway::RestApi": { "EndpointConfiguration.IpAddressType": "ipv4" },
1781
- "AWS::DynamoDB::Table": { "PointInTimeRecoverySpecification.RecoveryPeriodInDays": 35 },
1781
+ "AWS::DynamoDB::Table": {
1782
+ "PointInTimeRecoverySpecification.RecoveryPeriodInDays": 35,
1783
+ "ContributorInsightsSpecification.Mode": "ACCESSED_AND_THROTTLED_KEYS",
1784
+ "GlobalSecondaryIndexes.*.ContributorInsightsSpecification.Mode": "ACCESSED_AND_THROTTLED_KEYS",
1785
+ "SSESpecification.SSEType": "KMS"
1786
+ },
1787
+ "AWS::DynamoDB::GlobalTable": {
1788
+ "SSESpecification.SSEType": "KMS",
1789
+ "Replicas.*.ContributorInsightsSpecification.Mode": "ACCESSED_AND_THROTTLED_KEYS",
1790
+ "Replicas.*.GlobalSecondaryIndexes.*.ContributorInsightsSpecification.Mode": "ACCESSED_AND_THROTTLED_KEYS"
1791
+ },
1782
1792
  "AWS::ECS::TaskDefinition": { "ContainerDefinitions.*.Cpu": 0 },
1783
1793
  "AWS::Glue::Database": { "DatabaseInput.CreateTableDefaultPermissions": [{
1784
1794
  Permissions: ["ALL"],
@@ -1999,7 +2009,9 @@ const GENERATED_NESTED_PATHS = {
1999
2009
  "AWS::ECR::Repository": new Set(["LifecyclePolicy.RegistryId"]),
2000
2010
  "AWS::Lambda::Function": new Set(["LoggingConfig.LogGroup"]),
2001
2011
  "AWS::OpenSearchService::Domain": new Set(["EncryptionAtRestOptions.KmsKeyId"]),
2002
- "AWS::ApiGateway::Stage": new Set(["CanarySetting.DeploymentId"])
2012
+ "AWS::ApiGateway::Stage": new Set(["CanarySetting.DeploymentId"]),
2013
+ "AWS::DynamoDB::Table": new Set(["SSESpecification.KMSMasterKeyId"]),
2014
+ "AWS::DynamoDB::GlobalTable": new Set(["Replicas.*.SSESpecification.KMSMasterKeyId"])
2003
2015
  };
2004
2016
  const EB_OPTION_DEFAULTS = {
2005
2017
  "aws:autoscaling:asg|Availability Zones": "Any",
@@ -7835,6 +7847,11 @@ const CC_IDENTIFIER_ADAPTERS = {
7835
7847
  const rtb = declared.TransitGatewayRouteTableId;
7836
7848
  const att = declared.TransitGatewayAttachmentId;
7837
7849
  return typeof rtb === "string" && rtb.length > 0 && typeof att === "string" && att.length > 0 ? `${rtb}|${att}` : void 0;
7850
+ },
7851
+ "AWS::EC2::VPCCidrBlock": (pid, declared) => {
7852
+ if (pid.includes("|")) return pid;
7853
+ const vpcId = declared.VpcId;
7854
+ return typeof vpcId === "string" && vpcId.length > 0 ? `${pid}|${vpcId}` : void 0;
7838
7855
  }
7839
7856
  };
7840
7857
  function scalingPolicyComposite(pid, declared) {
@@ -10274,6 +10291,22 @@ const writeKinesisVideoSignalingChannel = async (ctx, ops) => {
10274
10291
  SingleMasterConfiguration: { MessageTtlSeconds: target }
10275
10292
  }));
10276
10293
  };
10294
+ const KVS_STREAM_STORAGE_TIER_DEFAULT = "HOT";
10295
+ const writeKinesisVideoStreamStorage = async (ctx, ops) => {
10296
+ const id = str(ctx.physicalId) ?? str(ctx.declared["Name"]);
10297
+ if (!id) throw new Error("cannot resolve Kinesis Video stream for revert");
10298
+ const op = ops.find((o) => o.path.replace(/^\//, "").replace(/\//g, ".").endsWith("DefaultStorageTier"));
10299
+ if (!op) return;
10300
+ const target = op.op === "add" && typeof op.value === "string" ? op.value : KVS_STREAM_STORAGE_TIER_DEFAULT;
10301
+ const kv = new KinesisVideoClient({ region: ctx.region });
10302
+ const version = (await kv.send(new DescribeStreamCommand(kvsStreamRef(id)))).StreamInfo?.Version;
10303
+ if (version === void 0) throw new Error(`cannot resolve stream version for ${id}`);
10304
+ await kv.send(new UpdateStreamStorageConfigurationCommand({
10305
+ ...kvsStreamRef(id),
10306
+ CurrentVersion: version,
10307
+ StreamStorageConfiguration: { DefaultStorageTier: target }
10308
+ }));
10309
+ };
10277
10310
  const SDK_WRITERS = {
10278
10311
  "AWS::ElasticBeanstalk::Application": writeElasticBeanstalkApplication,
10279
10312
  "AWS::ElasticBeanstalk::Environment": writeElasticBeanstalkEnvironment,
@@ -10376,6 +10409,10 @@ const SDK_NESTED_WRITERS = {
10376
10409
  match: isApiGatewayMethodKnobPath,
10377
10410
  writer: writeApiGatewayMethod
10378
10411
  },
10412
+ "AWS::KinesisVideo::Stream": {
10413
+ match: (p) => p === "StreamStorageConfiguration" || p.startsWith("StreamStorageConfiguration."),
10414
+ writer: writeKinesisVideoStreamStorage
10415
+ },
10379
10416
  "AWS::ECS::Service": {
10380
10417
  match: (p) => p === "ServiceConnectConfiguration" || p.startsWith("ServiceConnectConfiguration.") || p === "VolumeConfigurations" || p.startsWith("VolumeConfigurations.") || p.startsWith("VolumeConfigurations["),
10381
10418
  writer: writeEcsServiceWriteOnlyProps
@@ -10438,7 +10475,8 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
10438
10475
  "AWS::Cognito::UserPool\0UserPoolTier",
10439
10476
  "AWS::SNS::Subscription\0FilterPolicyScope",
10440
10477
  "AWS::InternetMonitor::Monitor\0Status",
10441
- "AWS::RolesAnywhere::Profile\0DurationSeconds"
10478
+ "AWS::RolesAnywhere::Profile\0DurationSeconds",
10479
+ "AWS::RolesAnywhere::Profile\0AttributeMappings"
10442
10480
  ]);
10443
10481
  /**
10444
10482
  * A nested undeclared value (a live sub-key inside a declared object, R96/R98) — a dotted