cdk-real-drift 0.22.1 → 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 +51 -1
- 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",
|
|
@@ -6082,6 +6107,12 @@ const IDENTITY_KEYED_SUBSET_ARRAYS = {
|
|
|
6082
6107
|
} }
|
|
6083
6108
|
};
|
|
6084
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
|
+
}
|
|
6085
6116
|
const NESTED_ARRAY_IDENTITY = {
|
|
6086
6117
|
"AWS::ApiGateway::Method": {
|
|
6087
6118
|
"Integration.IntegrationResponses": "StatusCode",
|
|
@@ -7621,6 +7652,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
7621
7652
|
if (VERSION_PREFIX_PATHS[resourceType]?.has(d.path) && isVersionPrefixMatch(d.stateValue, d.awsValue)) continue;
|
|
7622
7653
|
if (LATEST_SENTINEL_PATHS[resourceType]?.has(d.path) && isLatestSentinelMatch(d.stateValue, d.awsValue)) continue;
|
|
7623
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;
|
|
7624
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;
|
|
7625
7657
|
if (isTrivialEmpty(d.stateValue) && d.path in knownDef && deepEqual(d.awsValue, knownDef[d.path]) && !(MEANINGFUL_WHEN_OFF[resourceType]?.[d.path]?.({
|
|
7626
7658
|
declared,
|
|
@@ -10973,6 +11005,12 @@ async function enumerateRdsClusterChildren(ctx) {
|
|
|
10973
11005
|
});
|
|
10974
11006
|
}
|
|
10975
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
|
+
};
|
|
10976
11014
|
const route53RecordKey = (name, type, setIdentifier) => `${canonRoute53Name(name)}|${type.toUpperCase()}${setIdentifier !== void 0 ? `|${setIdentifier}` : ""}`;
|
|
10977
11015
|
const route53RecordSetIdentifier = (hostedZoneId, name, type, setIdentifier) => `${hostedZoneId}_${name}_${type.toUpperCase()}` + (setIdentifier !== void 0 ? `_${setIdentifier}` : "");
|
|
10978
11016
|
function diffRoute53HostedZoneChildren(input) {
|
|
@@ -10986,6 +11024,7 @@ function diffRoute53HostedZoneChildren(input) {
|
|
|
10986
11024
|
const name = canonRoute53Name(r.name);
|
|
10987
11025
|
if (type === "SOA") continue;
|
|
10988
11026
|
if (type === "NS" && apex !== void 0 && name === apex) continue;
|
|
11027
|
+
if (isAcmValidationRecord(type, r.live)) continue;
|
|
10989
11028
|
if (declared.has(route53RecordKey(r.name, r.type, r.setIdentifier))) continue;
|
|
10990
11029
|
const identifier = route53RecordSetIdentifier(hostedZoneId, r.name, type, r.setIdentifier);
|
|
10991
11030
|
added.push({
|
|
@@ -11580,6 +11619,7 @@ const readBudget = async ({ physicalId, declared, accountId, region }) => {
|
|
|
11580
11619
|
...b.BudgetLimit !== void 0 && { BudgetLimit: b.BudgetLimit },
|
|
11581
11620
|
...b.PlannedBudgetLimits !== void 0 && { PlannedBudgetLimits: b.PlannedBudgetLimits },
|
|
11582
11621
|
...b.CostFilters !== void 0 && { CostFilters: b.CostFilters },
|
|
11622
|
+
...b.CostTypes !== void 0 && { CostTypes: b.CostTypes },
|
|
11583
11623
|
...aad && { AutoAdjustData: {
|
|
11584
11624
|
...aad.AutoAdjustType !== void 0 && { AutoAdjustType: aad.AutoAdjustType },
|
|
11585
11625
|
...aad.HistoricalOptions?.BudgetAdjustmentPeriod !== void 0 && { HistoricalOptions: { BudgetAdjustmentPeriod: aad.HistoricalOptions.BudgetAdjustmentPeriod } }
|
|
@@ -13036,6 +13076,15 @@ const readSesConfigurationSetEventDestination = async ({ physicalId, declared, r
|
|
|
13036
13076
|
};
|
|
13037
13077
|
};
|
|
13038
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
|
+
};
|
|
13039
13088
|
const readAcmCertificate = async ({ physicalId, declared, region }) => {
|
|
13040
13089
|
const arn = str$1(physicalId);
|
|
13041
13090
|
if (!arn || !arn.startsWith("arn:")) return void 0;
|
|
@@ -13047,7 +13096,8 @@ const readAcmCertificate = async ({ physicalId, declared, region }) => {
|
|
|
13047
13096
|
if (!cert) return void 0;
|
|
13048
13097
|
const model = {};
|
|
13049
13098
|
if (str$1(cert.DomainName)) model.DomainName = cert.DomainName;
|
|
13050
|
-
|
|
13099
|
+
const keyAlg = str$1(cert.KeyAlgorithm);
|
|
13100
|
+
if (keyAlg) model.KeyAlgorithm = ACM_KEY_ALGORITHM_CANONICAL[keyAlg] ?? keyAlg;
|
|
13051
13101
|
const declaredSans = Array.isArray(declared.SubjectAlternativeNames) ? declared.SubjectAlternativeNames.filter((s) => str$1(s) !== void 0) : [];
|
|
13052
13102
|
const declaresSans = declaredSans.length > 0;
|
|
13053
13103
|
let sans = (cert.SubjectAlternativeNames ?? []).filter((s) => str$1(s) !== void 0);
|