cdk-real-drift 0.2.17 → 0.2.19
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 +47 -1
- package/dist/cli.js.map +1 -1
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -50,6 +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
54
|
import { DescribeDomainConfigCommand, OpenSearchClient, UpdateDomainConfigCommand } from "@aws-sdk/client-opensearch";
|
|
54
55
|
import { GetWebACLCommand, UpdateWebACLCommand, WAFV2Client } from "@aws-sdk/client-wafv2";
|
|
55
56
|
import { ConfigServiceClient, DescribeConfigRulesCommand, PutConfigRuleCommand } from "@aws-sdk/client-config-service";
|
|
@@ -2751,6 +2752,7 @@ const UNORDERED_OBJECT_ARRAY_IDENTITY = {
|
|
|
2751
2752
|
const UNORDERED_NESTED_OBJECT_ARRAY_PATHS = {
|
|
2752
2753
|
"AWS::CloudFront::CachePolicy": new Set(["CachePolicyConfig.ParametersInCacheKeyAndForwardedToOrigin.HeadersConfig.Headers"]),
|
|
2753
2754
|
"AWS::CloudFront::Distribution": new Set(["DistributionConfig.Aliases"]),
|
|
2755
|
+
"AWS::IoT::ThingType": new Set(["ThingTypeProperties.SearchableAttributes"]),
|
|
2754
2756
|
"AWS::Bedrock::Guardrail": new Set([
|
|
2755
2757
|
"ContentPolicyConfig.FiltersConfig",
|
|
2756
2758
|
"TopicPolicyConfig.TopicsConfig",
|
|
@@ -10206,6 +10208,46 @@ const writeElasticBeanstalkEnvironment = async (ctx, ops) => {
|
|
|
10206
10208
|
if (!any) return;
|
|
10207
10209
|
await new ElasticBeanstalkClient({ region: ctx.region }).send(new UpdateEnvironmentCommand(input));
|
|
10208
10210
|
};
|
|
10211
|
+
const KVS_STREAM_RETENTION_DEFAULT = 0;
|
|
10212
|
+
const KVS_CHANNEL_MESSAGE_TTL_DEFAULT = 60;
|
|
10213
|
+
const kvsStreamRef = (id) => id.startsWith("arn:") ? { StreamARN: id } : { StreamName: id };
|
|
10214
|
+
const kvsChannelDescribeRef = (id) => id.startsWith("arn:") ? { ChannelARN: id } : { ChannelName: id };
|
|
10215
|
+
const writeKinesisVideoStreamRetention = async (ctx, ops) => {
|
|
10216
|
+
const id = str(ctx.physicalId) ?? str(ctx.declared["Name"]);
|
|
10217
|
+
if (!id) throw new Error("cannot resolve Kinesis Video stream for revert");
|
|
10218
|
+
const op = ops.find((o) => o.path.replace(/^\//, "") === "DataRetentionInHours");
|
|
10219
|
+
if (!op) return;
|
|
10220
|
+
const target = op.op === "add" && typeof op.value === "number" ? op.value : KVS_STREAM_RETENTION_DEFAULT;
|
|
10221
|
+
const kv = new KinesisVideoClient({ region: ctx.region });
|
|
10222
|
+
const desc = await kv.send(new DescribeStreamCommand(kvsStreamRef(id)));
|
|
10223
|
+
const current = desc.StreamInfo?.DataRetentionInHours ?? 0;
|
|
10224
|
+
const version = desc.StreamInfo?.Version;
|
|
10225
|
+
if (version === void 0) throw new Error(`cannot resolve stream version for ${id}`);
|
|
10226
|
+
if (target === current) return;
|
|
10227
|
+
await kv.send(new UpdateDataRetentionCommand({
|
|
10228
|
+
...kvsStreamRef(id),
|
|
10229
|
+
CurrentVersion: version,
|
|
10230
|
+
Operation: target > current ? "INCREASE_DATA_RETENTION" : "DECREASE_DATA_RETENTION",
|
|
10231
|
+
DataRetentionChangeInHours: Math.abs(target - current)
|
|
10232
|
+
}));
|
|
10233
|
+
};
|
|
10234
|
+
const writeKinesisVideoSignalingChannel = async (ctx, ops) => {
|
|
10235
|
+
const id = str(ctx.physicalId) ?? str(ctx.declared["Name"]);
|
|
10236
|
+
if (!id) throw new Error("cannot resolve Kinesis Video signaling channel for revert");
|
|
10237
|
+
const op = ops.find((o) => o.path.replace(/^\//, "") === "MessageTtlSeconds");
|
|
10238
|
+
if (!op) return;
|
|
10239
|
+
const target = op.op === "add" && typeof op.value === "number" ? op.value : KVS_CHANNEL_MESSAGE_TTL_DEFAULT;
|
|
10240
|
+
const kv = new KinesisVideoClient({ region: ctx.region });
|
|
10241
|
+
const desc = await kv.send(new DescribeSignalingChannelCommand(kvsChannelDescribeRef(id)));
|
|
10242
|
+
const arn = desc.ChannelInfo?.ChannelARN;
|
|
10243
|
+
const version = desc.ChannelInfo?.Version;
|
|
10244
|
+
if (arn === void 0 || version === void 0) throw new Error(`cannot resolve signaling channel ARN/version for ${id}`);
|
|
10245
|
+
await kv.send(new UpdateSignalingChannelCommand({
|
|
10246
|
+
ChannelARN: arn,
|
|
10247
|
+
CurrentVersion: version,
|
|
10248
|
+
SingleMasterConfiguration: { MessageTtlSeconds: target }
|
|
10249
|
+
}));
|
|
10250
|
+
};
|
|
10209
10251
|
const SDK_WRITERS = {
|
|
10210
10252
|
"AWS::ElasticBeanstalk::Application": writeElasticBeanstalkApplication,
|
|
10211
10253
|
"AWS::ElasticBeanstalk::Environment": writeElasticBeanstalkEnvironment,
|
|
@@ -10241,6 +10283,8 @@ const SDK_WRITERS = {
|
|
|
10241
10283
|
const SDK_PROP_WRITERS = {
|
|
10242
10284
|
"AWS::Cognito::IdentityPool": { CognitoEvents: writeCognitoIdentityPoolEvents },
|
|
10243
10285
|
"AWS::Config::ConfigRule": { InputParameters: writeConfigRuleInputParameters },
|
|
10286
|
+
"AWS::KinesisVideo::Stream": { DataRetentionInHours: writeKinesisVideoStreamRetention },
|
|
10287
|
+
"AWS::KinesisVideo::SignalingChannel": { MessageTtlSeconds: writeKinesisVideoSignalingChannel },
|
|
10244
10288
|
"AWS::MSK::Configuration": { ServerProperties: writeMskConfiguration },
|
|
10245
10289
|
"AWS::IAM::Role": { Policies: writeIamRoleInlinePolicies },
|
|
10246
10290
|
"AWS::Logs::LogGroup": { BearerTokenAuthenticationEnabled: writeLogGroupBearerTokenAuth },
|
|
@@ -10366,7 +10410,9 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
|
|
|
10366
10410
|
"AWS::Cognito::UserPool\0DeletionProtection",
|
|
10367
10411
|
"AWS::Cognito::UserPool\0MfaConfiguration",
|
|
10368
10412
|
"AWS::Cognito::UserPool\0UserPoolTier",
|
|
10369
|
-
"AWS::SNS::Subscription\0FilterPolicyScope"
|
|
10413
|
+
"AWS::SNS::Subscription\0FilterPolicyScope",
|
|
10414
|
+
"AWS::InternetMonitor::Monitor\0Status",
|
|
10415
|
+
"AWS::RolesAnywhere::Profile\0DurationSeconds"
|
|
10370
10416
|
]);
|
|
10371
10417
|
/**
|
|
10372
10418
|
* A nested undeclared value (a live sub-key inside a declared object, R96/R98) — a dotted
|