cdk-real-drift 0.22.0 → 0.22.2
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 +56 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2991,6 +2991,30 @@ const KNOWN_DEFAULT_ONE_OF_PATHS = {
|
|
|
2991
2991
|
};
|
|
2992
2992
|
const KNOWN_DEFAULT_PATHS = {
|
|
2993
2993
|
"AWS::Backup::RestoreTestingPlan": { "RecoveryPointSelection.SelectionWindowDays": 30 },
|
|
2994
|
+
"AWS::Budgets::Budget": {
|
|
2995
|
+
"Budget.CostTypes": {
|
|
2996
|
+
IncludeTax: true,
|
|
2997
|
+
IncludeSubscription: true,
|
|
2998
|
+
UseBlended: false,
|
|
2999
|
+
IncludeRefund: true,
|
|
3000
|
+
IncludeCredit: true,
|
|
3001
|
+
IncludeUpfront: true,
|
|
3002
|
+
IncludeRecurring: true,
|
|
3003
|
+
IncludeOtherSubscription: true,
|
|
3004
|
+
IncludeSupport: true,
|
|
3005
|
+
IncludeDiscount: true,
|
|
3006
|
+
UseAmortized: false
|
|
3007
|
+
},
|
|
3008
|
+
"Budget.CostTypes.IncludeTax": true,
|
|
3009
|
+
"Budget.CostTypes.IncludeSubscription": true,
|
|
3010
|
+
"Budget.CostTypes.IncludeRefund": true,
|
|
3011
|
+
"Budget.CostTypes.IncludeCredit": true,
|
|
3012
|
+
"Budget.CostTypes.IncludeUpfront": true,
|
|
3013
|
+
"Budget.CostTypes.IncludeRecurring": true,
|
|
3014
|
+
"Budget.CostTypes.IncludeOtherSubscription": true,
|
|
3015
|
+
"Budget.CostTypes.IncludeSupport": true,
|
|
3016
|
+
"Budget.CostTypes.IncludeDiscount": true
|
|
3017
|
+
},
|
|
2994
3018
|
"AWS::IoT::TopicRule": { "TopicRulePayload.AwsIotSqlVersion": "2015-10-08" },
|
|
2995
3019
|
"AWS::SageMaker::DataQualityJobDefinition": {
|
|
2996
3020
|
"DataQualityJobInput.BatchTransformInput.S3DataDistributionType": "FullyReplicated",
|
|
@@ -3706,6 +3730,7 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
|
|
|
3706
3730
|
"AWS::StepFunctions::StateMachineAlias": new Set(["StateMachineArn"]),
|
|
3707
3731
|
"AWS::AutoScaling::ScheduledAction": new Set(["StartTime"]),
|
|
3708
3732
|
"AWS::CloudFormation::Stack": new Set(["TemplateBody", "Capabilities"]),
|
|
3733
|
+
"AWS::CloudFormation::StackSet": new Set(["TemplateBody"]),
|
|
3709
3734
|
"AWS::SageMaker::MonitoringSchedule": new Set([
|
|
3710
3735
|
"MonitoringScheduleStatus",
|
|
3711
3736
|
"LastMonitoringExecutionSummary",
|
|
@@ -5922,7 +5947,11 @@ const MEANINGFUL_WHEN_OFF = {
|
|
|
5922
5947
|
},
|
|
5923
5948
|
"AWS::Redshift::ScheduledAction": { Enable: () => true },
|
|
5924
5949
|
"AWS::RDS::DBInstance": { AutoMinorVersionUpgrade: notRestored("DBSnapshotIdentifier") },
|
|
5925
|
-
"AWS::RDS::DBCluster": { AutoMinorVersionUpgrade:
|
|
5950
|
+
"AWS::RDS::DBCluster": { AutoMinorVersionUpgrade: (ctx) => {
|
|
5951
|
+
const engine = ctx.live["Engine"] ?? ctx.declared["Engine"];
|
|
5952
|
+
if (typeof engine === "string" && engine.startsWith("aurora")) return false;
|
|
5953
|
+
return notRestored("SnapshotIdentifier", "SourceDBClusterIdentifier")(ctx);
|
|
5954
|
+
} },
|
|
5926
5955
|
"AWS::Neptune::DBInstance": { AutoMinorVersionUpgrade: () => true },
|
|
5927
5956
|
"AWS::ElastiCache::CacheCluster": { AutoMinorVersionUpgrade: notRestored("SnapshotName", "SnapshotArns") },
|
|
5928
5957
|
"AWS::ElastiCache::ReplicationGroup": { AutoMinorVersionUpgrade: notRestored("SnapshotName", "SnapshotArns") },
|
|
@@ -6078,6 +6107,12 @@ const IDENTITY_KEYED_SUBSET_ARRAYS = {
|
|
|
6078
6107
|
} }
|
|
6079
6108
|
};
|
|
6080
6109
|
const VALUE_INDEPENDENT_KEYED_ELEMENTS = { "AWS::Cognito::UserPoolUser": { UserAttributes: new Set(["sub"]) } };
|
|
6110
|
+
const SLACK_ID_MIGRATION_PATHS = { "AWS::Chatbot::SlackChannelConfiguration": new Set(["SlackChannelId"]) };
|
|
6111
|
+
const SLACK_MIGRATION_PREFIXES = new Set(["G", "C"]);
|
|
6112
|
+
function isSlackIdMigrationEqual(a, b) {
|
|
6113
|
+
if (typeof a !== "string" || typeof b !== "string") return false;
|
|
6114
|
+
return a.length > 1 && b.length > 1 && SLACK_MIGRATION_PREFIXES.has(a[0] ?? "") && SLACK_MIGRATION_PREFIXES.has(b[0] ?? "") && a.slice(1) === b.slice(1);
|
|
6115
|
+
}
|
|
6081
6116
|
const NESTED_ARRAY_IDENTITY = {
|
|
6082
6117
|
"AWS::ApiGateway::Method": {
|
|
6083
6118
|
"Integration.IntegrationResponses": "StatusCode",
|
|
@@ -7617,6 +7652,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
7617
7652
|
if (VERSION_PREFIX_PATHS[resourceType]?.has(d.path) && isVersionPrefixMatch(d.stateValue, d.awsValue)) continue;
|
|
7618
7653
|
if (LATEST_SENTINEL_PATHS[resourceType]?.has(d.path) && isLatestSentinelMatch(d.stateValue, d.awsValue)) continue;
|
|
7619
7654
|
if (INTELLIGENT_TIERING_PATHS[resourceType]?.has(d.path) && isIntelligentTieringMatch(d.stateValue, d.awsValue)) continue;
|
|
7655
|
+
if (SLACK_ID_MIGRATION_PATHS[resourceType]?.has(d.path) && isSlackIdMigrationEqual(d.stateValue, d.awsValue)) continue;
|
|
7620
7656
|
if ((UNORDERED_ARRAY_PROPS[resourceType]?.has(d.path) || UNORDERED_ARRAY_PROPS[resourceType]?.has(d.path.replace(/\.\d+(?=\.|$)/g, ".*")) || schema.unorderedScalarPaths?.includes(d.path)) && !ORDER_SIGNIFICANT_PATHS[resourceType]?.has(d.path) && isEqualUnorderedScalarSet(d.stateValue, d.awsValue)) continue;
|
|
7621
7657
|
if (isTrivialEmpty(d.stateValue) && d.path in knownDef && deepEqual(d.awsValue, knownDef[d.path]) && !(MEANINGFUL_WHEN_OFF[resourceType]?.[d.path]?.({
|
|
7622
7658
|
declared,
|
|
@@ -10969,6 +11005,12 @@ async function enumerateRdsClusterChildren(ctx) {
|
|
|
10969
11005
|
});
|
|
10970
11006
|
}
|
|
10971
11007
|
const canonRoute53Name = (s) => s.replace(/\.$/, "").toLowerCase();
|
|
11008
|
+
const ACM_VALIDATION_TARGET = /\.acm-validations\.aws\.?$/i;
|
|
11009
|
+
const isAcmValidationRecord = (type, live) => {
|
|
11010
|
+
if (type !== "CNAME") return false;
|
|
11011
|
+
const values = live?.ResourceRecords;
|
|
11012
|
+
return Array.isArray(values) && values.length === 1 && typeof values[0] === "string" && ACM_VALIDATION_TARGET.test(values[0]);
|
|
11013
|
+
};
|
|
10972
11014
|
const route53RecordKey = (name, type, setIdentifier) => `${canonRoute53Name(name)}|${type.toUpperCase()}${setIdentifier !== void 0 ? `|${setIdentifier}` : ""}`;
|
|
10973
11015
|
const route53RecordSetIdentifier = (hostedZoneId, name, type, setIdentifier) => `${hostedZoneId}_${name}_${type.toUpperCase()}` + (setIdentifier !== void 0 ? `_${setIdentifier}` : "");
|
|
10974
11016
|
function diffRoute53HostedZoneChildren(input) {
|
|
@@ -10982,6 +11024,7 @@ function diffRoute53HostedZoneChildren(input) {
|
|
|
10982
11024
|
const name = canonRoute53Name(r.name);
|
|
10983
11025
|
if (type === "SOA") continue;
|
|
10984
11026
|
if (type === "NS" && apex !== void 0 && name === apex) continue;
|
|
11027
|
+
if (isAcmValidationRecord(type, r.live)) continue;
|
|
10985
11028
|
if (declared.has(route53RecordKey(r.name, r.type, r.setIdentifier))) continue;
|
|
10986
11029
|
const identifier = route53RecordSetIdentifier(hostedZoneId, r.name, type, r.setIdentifier);
|
|
10987
11030
|
added.push({
|
|
@@ -11576,6 +11619,7 @@ const readBudget = async ({ physicalId, declared, accountId, region }) => {
|
|
|
11576
11619
|
...b.BudgetLimit !== void 0 && { BudgetLimit: b.BudgetLimit },
|
|
11577
11620
|
...b.PlannedBudgetLimits !== void 0 && { PlannedBudgetLimits: b.PlannedBudgetLimits },
|
|
11578
11621
|
...b.CostFilters !== void 0 && { CostFilters: b.CostFilters },
|
|
11622
|
+
...b.CostTypes !== void 0 && { CostTypes: b.CostTypes },
|
|
11579
11623
|
...aad && { AutoAdjustData: {
|
|
11580
11624
|
...aad.AutoAdjustType !== void 0 && { AutoAdjustType: aad.AutoAdjustType },
|
|
11581
11625
|
...aad.HistoricalOptions?.BudgetAdjustmentPeriod !== void 0 && { HistoricalOptions: { BudgetAdjustmentPeriod: aad.HistoricalOptions.BudgetAdjustmentPeriod } }
|
|
@@ -13032,6 +13076,15 @@ const readSesConfigurationSetEventDestination = async ({ physicalId, declared, r
|
|
|
13032
13076
|
};
|
|
13033
13077
|
};
|
|
13034
13078
|
const ACM_DEFAULT_TRANSPARENCY = "ENABLED";
|
|
13079
|
+
const ACM_KEY_ALGORITHM_CANONICAL = {
|
|
13080
|
+
"RSA-1024": "RSA_1024",
|
|
13081
|
+
"RSA-2048": "RSA_2048",
|
|
13082
|
+
"RSA-3072": "RSA_3072",
|
|
13083
|
+
"RSA-4096": "RSA_4096",
|
|
13084
|
+
"EC-prime256v1": "EC_prime256v1",
|
|
13085
|
+
"EC-secp384r1": "EC_secp384r1",
|
|
13086
|
+
"EC-secp521r1": "EC_secp521r1"
|
|
13087
|
+
};
|
|
13035
13088
|
const readAcmCertificate = async ({ physicalId, declared, region }) => {
|
|
13036
13089
|
const arn = str$1(physicalId);
|
|
13037
13090
|
if (!arn || !arn.startsWith("arn:")) return void 0;
|
|
@@ -13043,7 +13096,8 @@ const readAcmCertificate = async ({ physicalId, declared, region }) => {
|
|
|
13043
13096
|
if (!cert) return void 0;
|
|
13044
13097
|
const model = {};
|
|
13045
13098
|
if (str$1(cert.DomainName)) model.DomainName = cert.DomainName;
|
|
13046
|
-
|
|
13099
|
+
const keyAlg = str$1(cert.KeyAlgorithm);
|
|
13100
|
+
if (keyAlg) model.KeyAlgorithm = ACM_KEY_ALGORITHM_CANONICAL[keyAlg] ?? keyAlg;
|
|
13047
13101
|
const declaredSans = Array.isArray(declared.SubjectAlternativeNames) ? declared.SubjectAlternativeNames.filter((s) => str$1(s) !== void 0) : [];
|
|
13048
13102
|
const declaresSans = declaredSans.length > 0;
|
|
13049
13103
|
let sans = (cert.SubjectAlternativeNames ?? []).filter((s) => str$1(s) !== void 0);
|