cdk-real-drift 0.4.3 → 0.4.5
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 -6
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2075,7 +2075,8 @@ const KNOWN_DEFAULTS = {
|
|
|
2075
2075
|
},
|
|
2076
2076
|
"AWS::RedshiftServerless::Namespace": {
|
|
2077
2077
|
AdminUsername: "admin",
|
|
2078
|
-
KmsKeyId: "AWS_OWNED_KMS_KEY"
|
|
2078
|
+
KmsKeyId: "AWS_OWNED_KMS_KEY",
|
|
2079
|
+
DbName: "dev"
|
|
2079
2080
|
},
|
|
2080
2081
|
"AWS::RedshiftServerless::Workgroup": {
|
|
2081
2082
|
Port: 5439,
|
|
@@ -2366,7 +2367,24 @@ const KNOWN_DEFAULT_PATHS = {
|
|
|
2366
2367
|
"AWS::WAFv2::RuleGroup": { "Rules.*.Statement.RateBasedStatement.EvaluationWindowSec": 300 },
|
|
2367
2368
|
"AWS::SES::EmailIdentity": { "MailFromAttributes.BehaviorOnMxFailure": "USE_DEFAULT_VALUE" },
|
|
2368
2369
|
"AWS::SES::ReceiptRule": { "Rule.TlsPolicy": "Optional" },
|
|
2369
|
-
"AWS::MSK::Cluster": {
|
|
2370
|
+
"AWS::MSK::Cluster": {
|
|
2371
|
+
"BrokerNodeGroupInfo.BrokerAZDistribution": "DEFAULT",
|
|
2372
|
+
"BrokerNodeGroupInfo.ConnectivityInfo": {
|
|
2373
|
+
NetworkType: "IPV4",
|
|
2374
|
+
VpcConnectivity: { ClientAuthentication: {
|
|
2375
|
+
Sasl: {
|
|
2376
|
+
Iam: { Enabled: false },
|
|
2377
|
+
Scram: { Enabled: false }
|
|
2378
|
+
},
|
|
2379
|
+
Tls: { Enabled: false }
|
|
2380
|
+
} },
|
|
2381
|
+
PublicAccess: { Type: "DISABLED" }
|
|
2382
|
+
},
|
|
2383
|
+
"EncryptionInfo.EncryptionInTransit": {
|
|
2384
|
+
ClientBroker: "TLS",
|
|
2385
|
+
InCluster: true
|
|
2386
|
+
}
|
|
2387
|
+
},
|
|
2370
2388
|
"AWS::Batch::JobDefinition": {
|
|
2371
2389
|
"ContainerProperties.RuntimePlatform.CpuArchitecture": "X86_64",
|
|
2372
2390
|
"ContainerProperties.RuntimePlatform.OperatingSystemFamily": "LINUX",
|
|
@@ -2524,7 +2542,8 @@ const GENERATED_TOPLEVEL_PATHS = {
|
|
|
2524
2542
|
const DESCEND_UNDECLARED_OBJECT_PATHS = {
|
|
2525
2543
|
"AWS::EKS::Cluster": new Set(["KubernetesNetworkConfig"]),
|
|
2526
2544
|
"AWS::Athena::WorkGroup": new Set(["WorkGroupConfiguration"]),
|
|
2527
|
-
"AWS::KinesisVideo::Stream": new Set(["StreamStorageConfiguration"])
|
|
2545
|
+
"AWS::KinesisVideo::Stream": new Set(["StreamStorageConfiguration"]),
|
|
2546
|
+
"AWS::MSK::Cluster": new Set(["EncryptionInfo"])
|
|
2528
2547
|
};
|
|
2529
2548
|
const GENERATED_LOGICALID_PREFIX_PATHS = {
|
|
2530
2549
|
"AWS::Cognito::UserPoolClient": new Set(["ClientName"]),
|
|
@@ -2545,7 +2564,8 @@ const GENERATED_NESTED_PATHS = {
|
|
|
2545
2564
|
"AWS::ApiGateway::Stage": new Set(["CanarySetting.DeploymentId"]),
|
|
2546
2565
|
"AWS::DynamoDB::Table": new Set(["SSESpecification.KMSMasterKeyId"]),
|
|
2547
2566
|
"AWS::DynamoDB::GlobalTable": new Set(["Replicas.*.SSESpecification.KMSMasterKeyId"]),
|
|
2548
|
-
"AWS::AutoScaling::AutoScalingGroup": new Set(["LaunchTemplate.LaunchTemplateName"])
|
|
2567
|
+
"AWS::AutoScaling::AutoScalingGroup": new Set(["LaunchTemplate.LaunchTemplateName"]),
|
|
2568
|
+
"AWS::MSK::Cluster": new Set(["EncryptionInfo.EncryptionAtRest", "BrokerNodeGroupInfo.SecurityGroups"])
|
|
2549
2569
|
};
|
|
2550
2570
|
const EB_OPTION_DEFAULTS = {
|
|
2551
2571
|
"aws:autoscaling:asg|Availability Zones": "Any",
|
|
@@ -2736,7 +2756,12 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
|
|
|
2736
2756
|
"AWS::AppConfig::ExtensionAssociation": new Set(["ExtensionVersionNumber"]),
|
|
2737
2757
|
"AWS::StepFunctions::StateMachineVersion": new Set(["StateMachineRevisionId"]),
|
|
2738
2758
|
"AWS::StepFunctions::StateMachineAlias": new Set(["StateMachineArn"]),
|
|
2739
|
-
"AWS::AutoScaling::ScheduledAction": new Set(["StartTime"])
|
|
2759
|
+
"AWS::AutoScaling::ScheduledAction": new Set(["StartTime"]),
|
|
2760
|
+
"AWS::RedshiftServerless::Workgroup": new Set([
|
|
2761
|
+
"ConfigParameters",
|
|
2762
|
+
"SecurityGroupIds",
|
|
2763
|
+
"SubnetIds"
|
|
2764
|
+
])
|
|
2740
2765
|
};
|
|
2741
2766
|
function isPhysicalIdSegment(value, physicalId) {
|
|
2742
2767
|
if (typeof value !== "string" || physicalId === void 0) return false;
|
|
@@ -4812,6 +4837,26 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
4812
4837
|
SecondaryPrivateIpAddressCount: Math.max(0, ips.length - 1)
|
|
4813
4838
|
};
|
|
4814
4839
|
}
|
|
4840
|
+
if (resourceType === "AWS::ApiGateway::Stage") {
|
|
4841
|
+
const stageDeploymentId = declared["DeploymentId"] ?? live["DeploymentId"];
|
|
4842
|
+
if (typeof stageDeploymentId === "string") knownDefPaths = {
|
|
4843
|
+
...knownDefPaths,
|
|
4844
|
+
"CanarySetting.DeploymentId": stageDeploymentId
|
|
4845
|
+
};
|
|
4846
|
+
}
|
|
4847
|
+
if (resourceType === "AWS::EC2::VPCEndpoint") {
|
|
4848
|
+
const epType = declared["VpcEndpointType"];
|
|
4849
|
+
const dnsRecordIpType = epType === "Interface" ? "ipv4" : epType === "Gateway" ? "service-defined" : void 0;
|
|
4850
|
+
if (dnsRecordIpType !== void 0) knownDef = {
|
|
4851
|
+
...knownDef,
|
|
4852
|
+
DnsOptions: {
|
|
4853
|
+
DnsRecordIpType: dnsRecordIpType,
|
|
4854
|
+
PrivateDnsOnlyForInboundResolverEndpoint: "NotSpecified",
|
|
4855
|
+
PrivateDnsSpecifiedDomains: ["*"],
|
|
4856
|
+
PrivateDnsPreference: "VERIFIED_DOMAINS_ONLY"
|
|
4857
|
+
}
|
|
4858
|
+
};
|
|
4859
|
+
}
|
|
4815
4860
|
const generatedPaths = GENERATED_PATHS[resourceType] ?? [];
|
|
4816
4861
|
const generatedNestedPaths = GENERATED_NESTED_PATHS[resourceType];
|
|
4817
4862
|
const freeFormMapPaths = schema.freeFormMapPaths ?? [];
|
|
@@ -5157,7 +5202,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
5157
5202
|
}
|
|
5158
5203
|
continue;
|
|
5159
5204
|
}
|
|
5160
|
-
if (k in schema.defaults && matchesKnownDefault(v, schema.defaults[k]) || k in knownDef && matchesKnownDefault(v, knownDef[k]) || KNOWN_DEFAULT_ONE_OF[resourceType]?.[k]?.some((d) => matchesKnownDefault(v, d)) || VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS[resourceType]?.has(k) && !isTrivialEmpty(v) || clbDefaultSslPoliciesAtDefault(resourceType, k, v)) {
|
|
5205
|
+
if (k in schema.defaults && matchesKnownDefault(v, schema.defaults[k]) || k in knownDef && matchesKnownDefault(v, knownDef[k]) || KNOWN_DEFAULT_ONE_OF[resourceType]?.[k]?.some((d) => matchesKnownDefault(v, d)) || VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS[resourceType]?.has(k) && !isTrivialEmpty(v) && !(k in knownDef) || clbDefaultSslPoliciesAtDefault(resourceType, k, v)) {
|
|
5161
5206
|
findings.push({
|
|
5162
5207
|
tier: "atDefault",
|
|
5163
5208
|
logicalId,
|