cdk-real-drift 0.20.0 → 0.21.0
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 +94 -9
- package/dist/cli.js.map +1 -1
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -55,6 +55,7 @@ import { GetWorkgroupCommand, RedshiftServerlessClient } from "@aws-sdk/client-r
|
|
|
55
55
|
import { BuildBotLocaleCommand, CreateIntentCommand, CreateSlotCommand, CreateSlotTypeCommand, DeleteIntentCommand, DeleteSlotCommand, DeleteSlotTypeCommand, DescribeBotLocaleCommand, DescribeIntentCommand, DescribeSlotCommand, DescribeSlotTypeCommand, LexModelsV2Client, ListBotLocalesCommand, ListIntentsCommand, ListSlotTypesCommand, ListSlotsCommand, UpdateBotLocaleCommand, UpdateIntentCommand, UpdateSlotCommand, UpdateSlotTypeCommand } from "@aws-sdk/client-lex-models-v2";
|
|
56
56
|
import { GetScheduleCommand, SchedulerClient } from "@aws-sdk/client-scheduler";
|
|
57
57
|
import { DescribeReceiptRuleCommand, DescribeReceiptRuleSetCommand, ListReceiptFiltersCommand, SESClient, UpdateReceiptRuleCommand } from "@aws-sdk/client-ses";
|
|
58
|
+
import { GetConfigurationSetEventDestinationsCommand, SESv2Client } from "@aws-sdk/client-sesv2";
|
|
58
59
|
import { DescribeEndpointConfigCommand, DescribeMonitoringScheduleCommand, ListTagsCommand as ListTagsCommand$1, SageMakerClient, UpdateMonitoringScheduleCommand } from "@aws-sdk/client-sagemaker";
|
|
59
60
|
import { GetNamespaceCommand, GetServiceCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$4, ServiceDiscoveryClient, UpdateHttpNamespaceCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
|
|
60
61
|
import { createHash } from "node:crypto";
|
|
@@ -2266,6 +2267,25 @@ const KNOWN_DEFAULTS = {
|
|
|
2266
2267
|
"AWS::EKS::Addon": { NamespaceConfig: { Namespace: "kube-system" } },
|
|
2267
2268
|
"AWS::WAFv2::WebACL": { OnSourceDDoSProtectionConfig: { ALBLowReputationMode: "ACTIVE_UNDER_DDOS" } },
|
|
2268
2269
|
"AWS::VpcLattice::ServiceNetwork": { SharingConfig: { enabled: true } },
|
|
2270
|
+
"AWS::VpcLattice::AccessLogSubscription": { ServiceNetworkLogType: "SERVICE" },
|
|
2271
|
+
"AWS::VpcLattice::ResourceGateway": {
|
|
2272
|
+
IpAddressType: "IPV4",
|
|
2273
|
+
Ipv4AddressesPerEni: 16,
|
|
2274
|
+
ResourceConfigDnsResolution: "PUBLIC"
|
|
2275
|
+
},
|
|
2276
|
+
"AWS::VpcLattice::ResourceConfiguration": { AllowAssociationToSharableServiceNetwork: true },
|
|
2277
|
+
"AWS::SES::DedicatedIpPool": { ScalingMode: "STANDARD" },
|
|
2278
|
+
"AWS::CodeDeploy::Application": { ComputePlatform: "Server" },
|
|
2279
|
+
"AWS::EC2::TransitGatewayAttachment": { Options: {
|
|
2280
|
+
DnsSupport: "disable",
|
|
2281
|
+
SecurityGroupReferencingSupport: "enable",
|
|
2282
|
+
Ipv6Support: "disable",
|
|
2283
|
+
ApplianceModeSupport: "disable"
|
|
2284
|
+
} },
|
|
2285
|
+
"AWS::Backup::RestoreTestingPlan": {
|
|
2286
|
+
StartWindowHours: 24,
|
|
2287
|
+
ScheduleExpressionTimezone: "Etc/UTC"
|
|
2288
|
+
},
|
|
2269
2289
|
"AWS::AmazonMQ::Broker": {
|
|
2270
2290
|
AuthenticationStrategy: "SIMPLE",
|
|
2271
2291
|
EncryptionOptions: { UseAwsOwnedKey: true },
|
|
@@ -2970,6 +2990,7 @@ const KNOWN_DEFAULT_ONE_OF_PATHS = {
|
|
|
2970
2990
|
"AWS::OpenSearchService::Domain": { "EBSOptions.VolumeType": ["gp3", "gp2"] }
|
|
2971
2991
|
};
|
|
2972
2992
|
const KNOWN_DEFAULT_PATHS = {
|
|
2993
|
+
"AWS::Backup::RestoreTestingPlan": { "RecoveryPointSelection.SelectionWindowDays": 30 },
|
|
2973
2994
|
"AWS::IoT::TopicRule": { "TopicRulePayload.AwsIotSqlVersion": "2015-10-08" },
|
|
2974
2995
|
"AWS::SageMaker::DataQualityJobDefinition": {
|
|
2975
2996
|
"DataQualityJobInput.BatchTransformInput.S3DataDistributionType": "FullyReplicated",
|
|
@@ -3564,6 +3585,7 @@ function ebOptionSettingTier(namespace, optionName, value, envType, siblingOptio
|
|
|
3564
3585
|
const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
|
|
3565
3586
|
"AWS::ApiGateway::ApiKey": new Set(["Value"]),
|
|
3566
3587
|
"AWS::Backup::BackupVault": new Set(["EncryptionKeyArn"]),
|
|
3588
|
+
"AWS::Lambda::Version": new Set(["Description"]),
|
|
3567
3589
|
"AWS::Batch::JobQueue": new Set(["JobQueueType"]),
|
|
3568
3590
|
"AWS::ECS::Service": new Set(["AvailabilityZoneRebalancing", "PlatformVersion"]),
|
|
3569
3591
|
"AWS::KinesisAnalyticsV2::Application": new Set(["ApplicationMaintenanceConfiguration"]),
|
|
@@ -4172,7 +4194,8 @@ function isPropertiesFileEqual(a, b) {
|
|
|
4172
4194
|
const CASE_INSENSITIVE_ARRAY_PATHS = {
|
|
4173
4195
|
"AWS::ApiGatewayV2::Api": new Set(["CorsConfiguration.AllowHeaders", "CorsConfiguration.ExposeHeaders"]),
|
|
4174
4196
|
"AWS::Lambda::Url": new Set(["Cors.AllowHeaders", "Cors.ExposeHeaders"]),
|
|
4175
|
-
"AWS::CertificateManager::Certificate": new Set(["SubjectAlternativeNames"])
|
|
4197
|
+
"AWS::CertificateManager::Certificate": new Set(["SubjectAlternativeNames"]),
|
|
4198
|
+
"AWS::SES::ConfigurationSetEventDestination": new Set(["EventDestination.MatchingEventTypes"])
|
|
4176
4199
|
};
|
|
4177
4200
|
function isCaseInsensitiveEqualScalarSet(a, b) {
|
|
4178
4201
|
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
|
|
@@ -5878,6 +5901,7 @@ const notRestored = (...restoreSourceKeys) => ({ declared }) => restoreSourceKey
|
|
|
5878
5901
|
const MEANINGFUL_WHEN_OFF = {
|
|
5879
5902
|
"AWS::KMS::Key": { Enabled: () => true },
|
|
5880
5903
|
"AWS::ServiceCatalog::TagOption": { Active: () => true },
|
|
5904
|
+
"AWS::VpcLattice::ResourceConfiguration": { AllowAssociationToSharableServiceNetwork: () => true },
|
|
5881
5905
|
"AWS::SQS::Queue": { SqsManagedSseEnabled: ({ declared, live }) => declared["KmsMasterKeyId"] === void 0 && live["KmsMasterKeyId"] === void 0 },
|
|
5882
5906
|
"AWS::EC2::VPC": { EnableDnsSupport: () => true },
|
|
5883
5907
|
"AWS::EC2::Instance": { SourceDestCheck: () => true },
|
|
@@ -5965,7 +5989,8 @@ const DEFAULT_SG_LIST_PATHS = {
|
|
|
5965
5989
|
"AWS::EC2::Instance": "SecurityGroupIds",
|
|
5966
5990
|
"AWS::DAX::Cluster": "SecurityGroupIds",
|
|
5967
5991
|
"AWS::DMS::ReplicationInstance": "VpcSecurityGroupIds",
|
|
5968
|
-
"AWS::EC2::ClientVpnEndpoint": "SecurityGroupIds"
|
|
5992
|
+
"AWS::EC2::ClientVpnEndpoint": "SecurityGroupIds",
|
|
5993
|
+
"AWS::VpcLattice::ResourceGateway": "SecurityGroupIds"
|
|
5969
5994
|
};
|
|
5970
5995
|
/** #1269 fold decision for an UNDECLARED default-SUBNET list (RedshiftServerless Workgroup
|
|
5971
5996
|
* SubnetIds). Unlike the SG gate (which folds only a SINGLE default SG), a workgroup placed into
|
|
@@ -6371,21 +6396,23 @@ function stripInjectedJsonStringDefaults(declared, live, defaults) {
|
|
|
6371
6396
|
function isCfnGeneratedName(value, constructPath, physicalId, logicalId) {
|
|
6372
6397
|
if (typeof value !== "string" || value === physicalId) return false;
|
|
6373
6398
|
if (logicalId && value === logicalId) return true;
|
|
6399
|
+
const valueLc = value.toLowerCase();
|
|
6374
6400
|
if (logicalId && CFN_RANDOM_SUFFIX.test(value)) {
|
|
6375
|
-
const base =
|
|
6376
|
-
|
|
6401
|
+
const base = valueLc.replace(CFN_RANDOM_SUFFIX, "");
|
|
6402
|
+
const logicalLc = logicalId.toLowerCase();
|
|
6403
|
+
if (base.length > logicalLc.length && base.endsWith(`-${logicalLc}`)) return true;
|
|
6377
6404
|
}
|
|
6378
6405
|
if (!constructPath) return false;
|
|
6379
|
-
const stackName = constructPath.split("/")[0];
|
|
6406
|
+
const stackName = constructPath.split("/")[0]?.toLowerCase();
|
|
6380
6407
|
if (!stackName || !CFN_RANDOM_SUFFIX.test(value)) return false;
|
|
6381
|
-
if (
|
|
6408
|
+
if (valueLc.startsWith(`${stackName}-`)) return true;
|
|
6382
6409
|
if (!logicalId) return false;
|
|
6383
|
-
const base =
|
|
6410
|
+
const base = valueLc.replace(CFN_RANDOM_SUFFIX, "");
|
|
6384
6411
|
const sep = base.lastIndexOf("-");
|
|
6385
6412
|
if (sep <= 0) return false;
|
|
6386
6413
|
const stackPart = base.slice(0, sep);
|
|
6387
6414
|
const logicalPart = base.slice(sep + 1);
|
|
6388
|
-
return stackPart.length < stackName.length && stackName.startsWith(stackPart) && logicalPart.length > 0 && logicalId.startsWith(logicalPart);
|
|
6415
|
+
return stackPart.length < stackName.length && stackName.startsWith(stackPart) && logicalPart.length > 0 && logicalId.toLowerCase().startsWith(logicalPart);
|
|
6389
6416
|
}
|
|
6390
6417
|
function isSelfEchoTrivialEmpty(v, physicalId) {
|
|
6391
6418
|
if (physicalId === void 0 || v === null || typeof v !== "object" || Array.isArray(v)) return false;
|
|
@@ -12952,6 +12979,58 @@ const readSesReceiptFilter = async ({ physicalId, declared, region }) => {
|
|
|
12952
12979
|
} }
|
|
12953
12980
|
} };
|
|
12954
12981
|
};
|
|
12982
|
+
const SES_EVENT_TYPE_TO_CFN = {
|
|
12983
|
+
SEND: "send",
|
|
12984
|
+
REJECT: "reject",
|
|
12985
|
+
BOUNCE: "bounce",
|
|
12986
|
+
COMPLAINT: "complaint",
|
|
12987
|
+
DELIVERY: "delivery",
|
|
12988
|
+
OPEN: "open",
|
|
12989
|
+
CLICK: "click",
|
|
12990
|
+
RENDERING_FAILURE: "renderingFailure",
|
|
12991
|
+
DELIVERY_DELAY: "deliveryDelay",
|
|
12992
|
+
SUBSCRIPTION: "subscription"
|
|
12993
|
+
};
|
|
12994
|
+
const SES_DIMENSION_VALUE_SOURCE_TO_CFN = {
|
|
12995
|
+
MESSAGE_TAG: "messageTag",
|
|
12996
|
+
EMAIL_HEADER: "emailHeader",
|
|
12997
|
+
LINK_TAG: "linkTag"
|
|
12998
|
+
};
|
|
12999
|
+
const readSesConfigurationSetEventDestination = async ({ physicalId, declared, region }) => {
|
|
13000
|
+
const csName = str$1(declared.ConfigurationSetName);
|
|
13001
|
+
if (!csName) return void 0;
|
|
13002
|
+
const declDest = declared.EventDestination;
|
|
13003
|
+
const destName = str$1(declDest?.Name) ?? str$1(physicalId);
|
|
13004
|
+
if (!destName) return void 0;
|
|
13005
|
+
const live = ((await new SESv2Client({
|
|
13006
|
+
region,
|
|
13007
|
+
...READ_RETRY
|
|
13008
|
+
}).send(new GetConfigurationSetEventDestinationsCommand({ ConfigurationSetName: csName }))).EventDestinations ?? []).find((d) => d.Name === destName);
|
|
13009
|
+
if (!live) throw new ResourceGoneError(`SES event destination ${destName} absent from configuration set ${csName}`);
|
|
13010
|
+
const dest = {};
|
|
13011
|
+
if (str$1(declDest?.Name) !== void 0) dest.Name = live.Name;
|
|
13012
|
+
if (live.Enabled !== void 0) dest.Enabled = live.Enabled;
|
|
13013
|
+
if (live.MatchingEventTypes && live.MatchingEventTypes.length > 0) dest.MatchingEventTypes = live.MatchingEventTypes.map((t) => SES_EVENT_TYPE_TO_CFN[t] ?? t);
|
|
13014
|
+
const dims = live.CloudWatchDestination?.DimensionConfigurations;
|
|
13015
|
+
if (dims && dims.length > 0) dest.CloudWatchDestination = { DimensionConfigurations: dims.map((d) => ({
|
|
13016
|
+
DimensionName: d.DimensionName,
|
|
13017
|
+
DimensionValueSource: d.DimensionValueSource ? SES_DIMENSION_VALUE_SOURCE_TO_CFN[d.DimensionValueSource] ?? d.DimensionValueSource : d.DimensionValueSource,
|
|
13018
|
+
DefaultDimensionValue: d.DefaultDimensionValue
|
|
13019
|
+
})) };
|
|
13020
|
+
const kfh = live.KinesisFirehoseDestination;
|
|
13021
|
+
if (kfh) dest.KinesisFirehoseDestination = {
|
|
13022
|
+
...str$1(kfh.IamRoleArn) !== void 0 && { IAMRoleARN: kfh.IamRoleArn },
|
|
13023
|
+
...str$1(kfh.DeliveryStreamArn) !== void 0 && { DeliveryStreamARN: kfh.DeliveryStreamArn }
|
|
13024
|
+
};
|
|
13025
|
+
const sns = live.SnsDestination;
|
|
13026
|
+
if (sns && str$1(sns.TopicArn) !== void 0) dest.SnsDestination = { TopicARN: sns.TopicArn };
|
|
13027
|
+
const eb = live.EventBridgeDestination;
|
|
13028
|
+
if (eb && str$1(eb.EventBusArn) !== void 0) dest.EventBridgeDestination = { EventBusArn: eb.EventBusArn };
|
|
13029
|
+
return {
|
|
13030
|
+
ConfigurationSetName: csName,
|
|
13031
|
+
EventDestination: dest
|
|
13032
|
+
};
|
|
13033
|
+
};
|
|
12955
13034
|
const ACM_DEFAULT_TRANSPARENCY = "ENABLED";
|
|
12956
13035
|
const readAcmCertificate = async ({ physicalId, declared, region }) => {
|
|
12957
13036
|
const arn = str$1(physicalId);
|
|
@@ -13091,6 +13170,7 @@ const SDK_OVERRIDES = {
|
|
|
13091
13170
|
"AWS::SES::ReceiptRuleSet": readSesReceiptRuleSet,
|
|
13092
13171
|
"AWS::SES::ReceiptRule": readSesReceiptRule,
|
|
13093
13172
|
"AWS::SES::ReceiptFilter": readSesReceiptFilter,
|
|
13173
|
+
"AWS::SES::ConfigurationSetEventDestination": readSesConfigurationSetEventDestination,
|
|
13094
13174
|
"AWS::Cognito::IdentityPool": readCognitoIdentityPool,
|
|
13095
13175
|
"AWS::AppSync::ApiKey": readAppSyncApiKey,
|
|
13096
13176
|
"AWS::ServiceDiscovery::HttpNamespace": readServiceDiscoveryNamespace,
|
|
@@ -14133,7 +14213,8 @@ const DEFAULT_SG_LIST_TYPES = new Set([
|
|
|
14133
14213
|
"AWS::EC2::Instance",
|
|
14134
14214
|
"AWS::DAX::Cluster",
|
|
14135
14215
|
"AWS::DMS::ReplicationInstance",
|
|
14136
|
-
"AWS::EC2::ClientVpnEndpoint"
|
|
14216
|
+
"AWS::EC2::ClientVpnEndpoint",
|
|
14217
|
+
"AWS::VpcLattice::ResourceGateway"
|
|
14137
14218
|
]);
|
|
14138
14219
|
const DEFAULT_SUBNET_LIST_TYPES = new Set(["AWS::RedshiftServerless::Workgroup"]);
|
|
14139
14220
|
const defaultSgIdsCache = /* @__PURE__ */ new Map();
|
|
@@ -19125,6 +19206,10 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
|
|
|
19125
19206
|
"AWS::Cognito::UserPoolClient\0RefreshTokenValidity",
|
|
19126
19207
|
"AWS::RUM::AppMonitor\0CustomEvents",
|
|
19127
19208
|
"AWS::ServiceCatalog::TagOption\0Active",
|
|
19209
|
+
"AWS::VpcLattice::ResourceConfiguration\0AllowAssociationToSharableServiceNetwork",
|
|
19210
|
+
"AWS::Backup::RestoreTestingPlan\0StartWindowHours",
|
|
19211
|
+
"AWS::Backup::RestoreTestingPlan\0ScheduleExpressionTimezone",
|
|
19212
|
+
"AWS::EC2::TransitGatewayAttachment\0Options",
|
|
19128
19213
|
"AWS::Lambda::Url\0InvokeMode",
|
|
19129
19214
|
"AWS::RolesAnywhere::Profile\0DurationSeconds",
|
|
19130
19215
|
"AWS::RolesAnywhere::Profile\0AttributeMappings",
|