cdk-real-drift 0.13.11 → 0.13.13
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 +140 -33
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3209,6 +3209,7 @@ const CONTEXT_ARN_DEFAULTS = {
|
|
|
3209
3209
|
"AWS::Batch::ComputeEnvironment": { ServiceRole: "arn:{partition}:iam::{accountId}:role/aws-service-role/batch.amazonaws.com/AWSServiceRoleForBatch" },
|
|
3210
3210
|
"AWS::CodeBuild::Project": { EncryptionKey: "arn:{partition}:kms:{region}:{accountId}:alias/aws/s3" },
|
|
3211
3211
|
"AWS::SSM::MaintenanceWindowTask": { ServiceRoleArn: "arn:{partition}:iam::{accountId}:role/aws-service-role/ssm.amazonaws.com/AWSServiceRoleForAmazonSSM" },
|
|
3212
|
+
"AWS::LakeFormation::Resource": { RoleArn: "arn:{partition}:iam::{accountId}:role/aws-service-role/lakeformation.amazonaws.com/AWSServiceRoleForLakeFormationDataAccess" },
|
|
3212
3213
|
"AWS::LakeFormation::Tag": { CatalogId: "{accountId}" },
|
|
3213
3214
|
"AWS::LakeFormation::PrincipalPermissions": { Catalog: "{accountId}" },
|
|
3214
3215
|
"AWS::S3::AccessPoint": { BucketAccountId: "{accountId}" },
|
|
@@ -3694,7 +3695,10 @@ const ELB_ATTRIBUTE_DEFAULTS = {
|
|
|
3694
3695
|
"zonal_shift.config.enabled": "false",
|
|
3695
3696
|
"ipv6.deny_all_igw_traffic": "false"
|
|
3696
3697
|
},
|
|
3697
|
-
"AWS::ElasticLoadBalancingV2::Listener": {
|
|
3698
|
+
"AWS::ElasticLoadBalancingV2::Listener": {
|
|
3699
|
+
"routing.http.response.server.enabled": "true",
|
|
3700
|
+
"tcp.idle_timeout.seconds": "350"
|
|
3701
|
+
},
|
|
3698
3702
|
"AWS::ElasticLoadBalancingV2::TargetGroup": {
|
|
3699
3703
|
"deregistration_delay.timeout_seconds": "300",
|
|
3700
3704
|
"lambda.multi_value_headers.enabled": "false",
|
|
@@ -3716,6 +3720,34 @@ const ELB_ATTRIBUTE_DEFAULTS_BY_LB_TYPE = {
|
|
|
3716
3720
|
network: { "load_balancing.cross_zone.enabled": "false" },
|
|
3717
3721
|
gateway: { "load_balancing.cross_zone.enabled": "false" }
|
|
3718
3722
|
};
|
|
3723
|
+
const ELB_TG_ATTRIBUTE_DEFAULTS_BY_PROTOCOL = {
|
|
3724
|
+
GENEVE: {
|
|
3725
|
+
"stickiness.type": "source_ip_dest_ip_proto",
|
|
3726
|
+
"target_failover.on_deregistration": "no_rebalance",
|
|
3727
|
+
"target_failover.on_unhealthy": "no_rebalance"
|
|
3728
|
+
},
|
|
3729
|
+
TCP: {
|
|
3730
|
+
"stickiness.type": "source_ip",
|
|
3731
|
+
"deregistration_delay.connection_termination.enabled": "false",
|
|
3732
|
+
"proxy_protocol_v2.enabled": "false"
|
|
3733
|
+
},
|
|
3734
|
+
TLS: {
|
|
3735
|
+
"stickiness.type": "source_ip",
|
|
3736
|
+
"deregistration_delay.connection_termination.enabled": "false",
|
|
3737
|
+
"proxy_protocol_v2.enabled": "false"
|
|
3738
|
+
},
|
|
3739
|
+
UDP: {
|
|
3740
|
+
"stickiness.type": "source_ip",
|
|
3741
|
+
"deregistration_delay.connection_termination.enabled": "false",
|
|
3742
|
+
"proxy_protocol_v2.enabled": "false"
|
|
3743
|
+
},
|
|
3744
|
+
TCP_UDP: {
|
|
3745
|
+
"stickiness.type": "source_ip",
|
|
3746
|
+
"deregistration_delay.connection_termination.enabled": "false",
|
|
3747
|
+
"proxy_protocol_v2.enabled": "false"
|
|
3748
|
+
}
|
|
3749
|
+
};
|
|
3750
|
+
const ELB_TG_ATTRIBUTE_DEFAULTS_BY_TARGET_TYPE = { alb: { "preserve_client_ip.enabled": "true" } };
|
|
3719
3751
|
const SENTINEL_UNPARSEABLE = Symbol("unparseable");
|
|
3720
3752
|
function deepCompareUnordered(a, b) {
|
|
3721
3753
|
if (a === b) return true;
|
|
@@ -3772,6 +3804,7 @@ const JSON_STRING_DEFAULT_FILLS = { "AWS::CE::CostCategory": { Rules: { Type: "R
|
|
|
3772
3804
|
const CASE_INSENSITIVE_PATHS = {
|
|
3773
3805
|
"AWS::Route53::RecordSet": new Set(["Name", "AliasTarget.DNSName"]),
|
|
3774
3806
|
"AWS::Batch::ComputeEnvironment": new Set(["Type"]),
|
|
3807
|
+
"AWS::Batch::JobDefinition": new Set(["Type"]),
|
|
3775
3808
|
"AWS::EMRServerless::Application": new Set(["Type"]),
|
|
3776
3809
|
"AWS::RDS::DBInstance": new Set(["DBInstanceIdentifier"]),
|
|
3777
3810
|
"AWS::RDS::DBCluster": new Set(["DBClusterIdentifier"]),
|
|
@@ -3791,6 +3824,7 @@ const CASE_INSENSITIVE_PATHS = {
|
|
|
3791
3824
|
"AWS::Neptune::DBParameterGroup": new Set(["Name"]),
|
|
3792
3825
|
"AWS::Neptune::DBClusterParameterGroup": new Set(["Name"]),
|
|
3793
3826
|
"AWS::DocDB::DBClusterParameterGroup": new Set(["Name"]),
|
|
3827
|
+
"AWS::Redshift::ClusterParameterGroup": new Set(["ParameterGroupName"]),
|
|
3794
3828
|
"AWS::DMS::ReplicationInstance": new Set(["ReplicationInstanceIdentifier"]),
|
|
3795
3829
|
"AWS::DMS::ReplicationSubnetGroup": new Set(["ReplicationSubnetGroupIdentifier"]),
|
|
3796
3830
|
"AWS::DMS::Endpoint": new Set(["EndpointType", "EndpointIdentifier"]),
|
|
@@ -5634,6 +5668,26 @@ function hasPathUnsafeKey(o) {
|
|
|
5634
5668
|
|
|
5635
5669
|
//#endregion
|
|
5636
5670
|
//#region src/diff/classify.ts
|
|
5671
|
+
function elbAttributeDefaultsFor(resourceType, declared, live) {
|
|
5672
|
+
const shared = ELB_ATTRIBUTE_DEFAULTS[resourceType] ?? {};
|
|
5673
|
+
if (resourceType === "AWS::ElasticLoadBalancingV2::LoadBalancer") {
|
|
5674
|
+
const lbType = String(live.Type ?? declared.Type ?? "application");
|
|
5675
|
+
return {
|
|
5676
|
+
...shared,
|
|
5677
|
+
...ELB_ATTRIBUTE_DEFAULTS_BY_LB_TYPE[lbType] ?? {}
|
|
5678
|
+
};
|
|
5679
|
+
}
|
|
5680
|
+
if (resourceType === "AWS::ElasticLoadBalancingV2::TargetGroup") {
|
|
5681
|
+
const protocol = declared.Protocol ?? live.Protocol;
|
|
5682
|
+
const targetType = declared.TargetType ?? live.TargetType;
|
|
5683
|
+
return {
|
|
5684
|
+
...shared,
|
|
5685
|
+
...typeof protocol === "string" ? ELB_TG_ATTRIBUTE_DEFAULTS_BY_PROTOCOL[protocol] ?? {} : {},
|
|
5686
|
+
...typeof targetType === "string" ? ELB_TG_ATTRIBUTE_DEFAULTS_BY_TARGET_TYPE[targetType] ?? {} : {}
|
|
5687
|
+
};
|
|
5688
|
+
}
|
|
5689
|
+
return shared;
|
|
5690
|
+
}
|
|
5637
5691
|
const ELB_ATTRIBUTE_BAGS = {
|
|
5638
5692
|
"AWS::ElasticLoadBalancingV2::LoadBalancer": "LoadBalancerAttributes",
|
|
5639
5693
|
"AWS::ElasticLoadBalancingV2::TargetGroup": "TargetGroupAttributes",
|
|
@@ -6002,24 +6056,47 @@ function alignCompositeKeySubset(declared, live, spec) {
|
|
|
6002
6056
|
});
|
|
6003
6057
|
}
|
|
6004
6058
|
const isNestedObject = (x) => x !== null && typeof x === "object" && !Array.isArray(x);
|
|
6059
|
+
function nicZeroGroupSetEquals(declaredNics, liveSgIds) {
|
|
6060
|
+
if (!Array.isArray(declaredNics)) return false;
|
|
6061
|
+
const nic0 = declaredNics.find((n) => n !== null && typeof n === "object" && (n.DeviceIndex === "0" || n.DeviceIndex === 0));
|
|
6062
|
+
if (nic0 === void 0) return false;
|
|
6063
|
+
const groupSet = nic0.GroupSet;
|
|
6064
|
+
if (!Array.isArray(groupSet) || groupSet.length !== liveSgIds.length) return false;
|
|
6065
|
+
if (!groupSet.every((g) => typeof g === "string") || !liveSgIds.every((g) => typeof g === "string")) return false;
|
|
6066
|
+
const live = new Set(liveSgIds);
|
|
6067
|
+
return groupSet.length === live.size && groupSet.every((g) => live.has(g));
|
|
6068
|
+
}
|
|
6005
6069
|
const DDB_TABLE_TYPES = new Set(["AWS::DynamoDB::Table", "AWS::DynamoDB::GlobalTable"]);
|
|
6070
|
+
function capacityUnit(x) {
|
|
6071
|
+
if (typeof x === "number") return x;
|
|
6072
|
+
if (typeof x === "string" && x.trim() !== "" && !Number.isNaN(Number(x))) return Number(x);
|
|
6073
|
+
}
|
|
6006
6074
|
function warmThroughputDefault(provisionedThroughput) {
|
|
6007
|
-
if (isNestedObject(provisionedThroughput)
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6075
|
+
if (isNestedObject(provisionedThroughput)) {
|
|
6076
|
+
const read = capacityUnit(provisionedThroughput.ReadCapacityUnits);
|
|
6077
|
+
const write = capacityUnit(provisionedThroughput.WriteCapacityUnits);
|
|
6078
|
+
if (read !== void 0 && write !== void 0) return {
|
|
6079
|
+
ReadUnitsPerSecond: read,
|
|
6080
|
+
WriteUnitsPerSecond: write
|
|
6081
|
+
};
|
|
6082
|
+
}
|
|
6011
6083
|
return {
|
|
6012
6084
|
ReadUnitsPerSecond: 12e3,
|
|
6013
6085
|
WriteUnitsPerSecond: 4e3
|
|
6014
6086
|
};
|
|
6015
6087
|
}
|
|
6016
|
-
function
|
|
6088
|
+
function gsiByName(model, indexName) {
|
|
6089
|
+
if (!isNestedObject(model) || !Array.isArray(model.GlobalSecondaryIndexes)) return void 0;
|
|
6090
|
+
const gsi = model.GlobalSecondaryIndexes.find((g) => isNestedObject(g) && g.IndexName === indexName);
|
|
6091
|
+
return isNestedObject(gsi) ? gsi : void 0;
|
|
6092
|
+
}
|
|
6093
|
+
function dynamoGsiWarmThroughputAtDefault(resourceType, path, value, live, declared) {
|
|
6017
6094
|
if (!DDB_TABLE_TYPES.has(resourceType)) return false;
|
|
6018
6095
|
const m = /^GlobalSecondaryIndexes\[(.*)\]\.WarmThroughput$/.exec(path);
|
|
6019
|
-
if (m === null
|
|
6020
|
-
const
|
|
6021
|
-
|
|
6022
|
-
return deepEqual(value, warmThroughputDefault(
|
|
6096
|
+
if (m === null) return false;
|
|
6097
|
+
const liveGsi = gsiByName(live, m[1]);
|
|
6098
|
+
const declaredGsi = gsiByName(declared, m[1]);
|
|
6099
|
+
return liveGsi !== void 0 && deepEqual(value, warmThroughputDefault(liveGsi.ProvisionedThroughput)) || declaredGsi !== void 0 && deepEqual(value, warmThroughputDefault(declaredGsi.ProvisionedThroughput));
|
|
6023
6100
|
}
|
|
6024
6101
|
const CLB_DEFAULT_SSL_POLICY_NAME = "ELBSecurityPolicy-2016-08";
|
|
6025
6102
|
function clbDefaultSslPoliciesAtDefault(resourceType, key, value) {
|
|
@@ -6635,12 +6712,17 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
6635
6712
|
if (resourceType === "AWS::ElasticLoadBalancingV2::TargetGroup") {
|
|
6636
6713
|
const targetType = declaredIn?.["TargetType"];
|
|
6637
6714
|
const protocolVersion = declaredIn?.["ProtocolVersion"] ?? live["ProtocolVersion"];
|
|
6715
|
+
const protocol = declaredIn?.["Protocol"] ?? live["Protocol"];
|
|
6638
6716
|
knownDef = {
|
|
6639
6717
|
...knownDef,
|
|
6640
6718
|
HealthyThresholdCount: 5,
|
|
6641
|
-
HealthCheckIntervalSeconds: targetType === "lambda" ? 35 : 30,
|
|
6719
|
+
HealthCheckIntervalSeconds: targetType === "lambda" ? 35 : protocol === "GENEVE" ? 10 : 30,
|
|
6642
6720
|
HealthCheckPath: protocolVersion === "GRPC" ? "/AWS.ALB/healthcheck" : "/",
|
|
6643
6721
|
...targetType === "lambda" ? { HealthCheckTimeoutSeconds: 30 } : {},
|
|
6722
|
+
...targetType === "alb" ? {
|
|
6723
|
+
HealthCheckTimeoutSeconds: 6,
|
|
6724
|
+
Matcher: { HttpCode: "200-399" }
|
|
6725
|
+
} : {},
|
|
6644
6726
|
...protocolVersion === "GRPC" ? { Matcher: { GrpcCode: "12" } } : {}
|
|
6645
6727
|
};
|
|
6646
6728
|
}
|
|
@@ -6895,7 +6977,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
6895
6977
|
const parentKey = (path.split(".").pop() ?? "").replace(/\[.*$/, "");
|
|
6896
6978
|
if (!isObjectForm || /tags$/i.test(parentKey)) return;
|
|
6897
6979
|
}
|
|
6898
|
-
const tier = schemaPath in schema.defaultPaths && matchesKnownDefault(value, schema.defaultPaths[schemaPath]) || schemaPath in knownDefPaths && matchesKnownDefault(value, knownDefPaths[schemaPath]) || (KNOWN_DEFAULT_ONE_OF_PATHS[resourceType]?.[schemaPath]?.some((d) => matchesKnownDefault(value, d)) ?? false) || VALUE_INDEPENDENT_DEFAULT_NESTED_PATHS[resourceType]?.has(schemaPath) && !(schemaPath in knownDefPaths) || dynamoGsiWarmThroughputAtDefault(resourceType, path, value, live) || resourceType === "AWS::Events::EventBusPolicy" && schemaPath === "Statement.*.Sid" && typeof value === "string" && value === declared["StatementId"] ? "atDefault" : generatedPaths.includes(schemaPath) && isPhysicalIdSegment(value, physicalId) || generatedNestedPaths?.has(schemaPath) && !(schemaPath in knownDefPaths) && (!(schemaPath in (MANAGED_KEY_ALIAS_PATHS[resourceType] ?? {})) || shouldFoldManagedServiceKey(resourceType, schemaPath, value, opts.kmsAliasTargets)) ? "generated" : "undeclared";
|
|
6980
|
+
const tier = schemaPath in schema.defaultPaths && matchesKnownDefault(value, schema.defaultPaths[schemaPath]) || schemaPath in knownDefPaths && matchesKnownDefault(value, knownDefPaths[schemaPath]) || (KNOWN_DEFAULT_ONE_OF_PATHS[resourceType]?.[schemaPath]?.some((d) => matchesKnownDefault(value, d)) ?? false) || VALUE_INDEPENDENT_DEFAULT_NESTED_PATHS[resourceType]?.has(schemaPath) && !(schemaPath in knownDefPaths) || dynamoGsiWarmThroughputAtDefault(resourceType, path, value, live, declared) || resourceType === "AWS::Events::EventBusPolicy" && schemaPath === "Statement.*.Sid" && typeof value === "string" && value === declared["StatementId"] ? "atDefault" : generatedPaths.includes(schemaPath) && isPhysicalIdSegment(value, physicalId) || generatedNestedPaths?.has(schemaPath) && !(schemaPath in knownDefPaths) && (!(schemaPath in (MANAGED_KEY_ALIAS_PATHS[resourceType] ?? {})) || shouldFoldManagedServiceKey(resourceType, schemaPath, value, opts.kmsAliasTargets)) ? "generated" : "undeclared";
|
|
6899
6981
|
const freeFormKey = tier === "undeclared" && underFreeFormMap(schemaPath);
|
|
6900
6982
|
findings.push({
|
|
6901
6983
|
tier,
|
|
@@ -7079,11 +7161,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
7079
7161
|
});
|
|
7080
7162
|
}
|
|
7081
7163
|
const declaredKeys = new Set(v.filter(isKeyValueEntry).map((e) => e.Key));
|
|
7082
|
-
const
|
|
7083
|
-
const attrDefaults = {
|
|
7084
|
-
...ELB_ATTRIBUTE_DEFAULTS[resourceType] ?? {},
|
|
7085
|
-
...lbType === void 0 ? {} : ELB_ATTRIBUTE_DEFAULTS_BY_LB_TYPE[lbType] ?? {}
|
|
7086
|
-
};
|
|
7164
|
+
const attrDefaults = elbAttributeDefaultsFor(resourceType, declared, live);
|
|
7087
7165
|
for (const lEl of liveBag) {
|
|
7088
7166
|
if (!isKeyValueEntry(lEl)) continue;
|
|
7089
7167
|
const key = lEl.Key;
|
|
@@ -7280,11 +7358,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
7280
7358
|
for (const [k, v] of Object.entries(live)) {
|
|
7281
7359
|
if (k in declared) continue;
|
|
7282
7360
|
if (k === ELB_ATTRIBUTE_BAGS[resourceType] && Array.isArray(v)) {
|
|
7283
|
-
const
|
|
7284
|
-
const attrDefaults = {
|
|
7285
|
-
...ELB_ATTRIBUTE_DEFAULTS[resourceType] ?? {},
|
|
7286
|
-
...lbType === void 0 ? {} : ELB_ATTRIBUTE_DEFAULTS_BY_LB_TYPE[lbType] ?? {}
|
|
7287
|
-
};
|
|
7361
|
+
const attrDefaults = elbAttributeDefaultsFor(resourceType, declared, live);
|
|
7288
7362
|
for (const lEl of v) {
|
|
7289
7363
|
if (!isKeyValueEntry(lEl)) continue;
|
|
7290
7364
|
const key = lEl.Key;
|
|
@@ -7312,6 +7386,16 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
7312
7386
|
});
|
|
7313
7387
|
continue;
|
|
7314
7388
|
}
|
|
7389
|
+
if (resourceType === "AWS::EC2::Instance" && k === "SecurityGroupIds" && Array.isArray(v) && nicZeroGroupSetEquals(declared.NetworkInterfaces, v)) {
|
|
7390
|
+
findings.push({
|
|
7391
|
+
tier: "atDefault",
|
|
7392
|
+
logicalId,
|
|
7393
|
+
resourceType,
|
|
7394
|
+
path: k,
|
|
7395
|
+
actual: v
|
|
7396
|
+
});
|
|
7397
|
+
continue;
|
|
7398
|
+
}
|
|
7315
7399
|
if (DEFAULT_SG_LIST_PATHS[resourceType] === k && !isTrivialEmpty(v)) {
|
|
7316
7400
|
findings.push({
|
|
7317
7401
|
tier: shouldFoldDefaultSgList(resourceType, k, v, opts.defaultSgIds) ? "atDefault" : "undeclared",
|
|
@@ -7464,7 +7548,17 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
7464
7548
|
continue;
|
|
7465
7549
|
}
|
|
7466
7550
|
}
|
|
7467
|
-
if (DDB_TABLE_TYPES.has(resourceType) && k === "WarmThroughput" && deepEqual(v, warmThroughputDefault(live.ProvisionedThroughput))) {
|
|
7551
|
+
if (DDB_TABLE_TYPES.has(resourceType) && k === "WarmThroughput" && (deepEqual(v, warmThroughputDefault(live.ProvisionedThroughput)) || deepEqual(v, warmThroughputDefault(declared.ProvisionedThroughput)))) {
|
|
7552
|
+
findings.push({
|
|
7553
|
+
tier: "atDefault",
|
|
7554
|
+
logicalId,
|
|
7555
|
+
resourceType,
|
|
7556
|
+
path: k,
|
|
7557
|
+
actual: v
|
|
7558
|
+
});
|
|
7559
|
+
continue;
|
|
7560
|
+
}
|
|
7561
|
+
if (resourceType === "AWS::ServiceDiscovery::Service" && k === "Type" && v === (declared.DnsConfig !== void 0 ? "DNS_HTTP" : "HTTP")) {
|
|
7468
7562
|
findings.push({
|
|
7469
7563
|
tier: "atDefault",
|
|
7470
7564
|
logicalId,
|
|
@@ -9613,6 +9707,7 @@ async function enumerateListenerChildren(ctx) {
|
|
|
9613
9707
|
const { parent, desired, region } = ctx;
|
|
9614
9708
|
const listenerArn = parent.physicalId;
|
|
9615
9709
|
if (!listenerArn) return [];
|
|
9710
|
+
if (listenerArn.includes(":listener/gwy/")) return [];
|
|
9616
9711
|
const declaredRuleArns = [];
|
|
9617
9712
|
for (const r of desired.resources) if (r.resourceType === "AWS::ElasticLoadBalancingV2::ListenerRule" && parentRefMatches(r.declared.ListenerArn, listenerArn) && r.physicalId) declaredRuleArns.push(r.physicalId);
|
|
9618
9713
|
return diffListenerChildren({
|
|
@@ -9781,6 +9876,10 @@ async function pageSubnets(client, vpcId) {
|
|
|
9781
9876
|
} while (next);
|
|
9782
9877
|
return out;
|
|
9783
9878
|
}
|
|
9879
|
+
const SERVICE_MANAGED_VPCE_TAG_KEYS = new Set(["AWSMSKManaged"]);
|
|
9880
|
+
function isServiceManagedVpcEndpoint(e) {
|
|
9881
|
+
return (e.Tags ?? []).some((t) => typeof t.Key === "string" && SERVICE_MANAGED_VPCE_TAG_KEYS.has(t.Key));
|
|
9882
|
+
}
|
|
9784
9883
|
async function pageVpcEndpoints(client, vpcId) {
|
|
9785
9884
|
const out = [];
|
|
9786
9885
|
let next;
|
|
@@ -9883,7 +9982,7 @@ async function enumerateVpcChildren(ctx) {
|
|
|
9883
9982
|
id: s.SubnetId,
|
|
9884
9983
|
label: s.CidrBlock ? `${s.CidrBlock}` : s.SubnetId
|
|
9885
9984
|
}));
|
|
9886
|
-
const liveEndpoints = (await pageVpcEndpoints(client, vpcId)).filter((e) => typeof e.VpcEndpointId === "string").map((e) => ({
|
|
9985
|
+
const liveEndpoints = (await pageVpcEndpoints(client, vpcId)).filter((e) => typeof e.VpcEndpointId === "string").filter((e) => !isServiceManagedVpcEndpoint(e)).map((e) => ({
|
|
9887
9986
|
id: e.VpcEndpointId,
|
|
9888
9987
|
label: e.ServiceName ?? e.VpcEndpointId
|
|
9889
9988
|
}));
|
|
@@ -11068,8 +11167,10 @@ const readDmsReplicationTask = async ({ physicalId, declared, region }) => {
|
|
|
11068
11167
|
return model;
|
|
11069
11168
|
};
|
|
11070
11169
|
const readLakeFormationResource = async ({ physicalId, region }) => {
|
|
11071
|
-
const
|
|
11072
|
-
if (!
|
|
11170
|
+
const raw = str$1(physicalId);
|
|
11171
|
+
if (!raw) return void 0;
|
|
11172
|
+
const arnStart = raw.indexOf("arn:");
|
|
11173
|
+
const arn = arnStart >= 0 ? raw.slice(arnStart) : raw;
|
|
11073
11174
|
const c = new LakeFormationClient({
|
|
11074
11175
|
region,
|
|
11075
11176
|
...READ_RETRY
|
|
@@ -11965,13 +12066,17 @@ const readServiceDiscoveryService = async ({ physicalId, declared, region }) =>
|
|
|
11965
12066
|
if (s.Description !== void 0) model.Description = s.Description;
|
|
11966
12067
|
if (s.NamespaceId !== void 0) model.NamespaceId = s.NamespaceId;
|
|
11967
12068
|
if (s.Type !== void 0) model.Type = s.Type;
|
|
11968
|
-
if (s.DnsConfig)
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
12069
|
+
if (s.DnsConfig) {
|
|
12070
|
+
const declaredDnsConfig = declared?.DnsConfig;
|
|
12071
|
+
model.DnsConfig = {
|
|
12072
|
+
...declaredDnsConfig !== null && typeof declaredDnsConfig === "object" && declaredDnsConfig.NamespaceId !== void 0 && s.NamespaceId !== void 0 && { NamespaceId: s.NamespaceId },
|
|
12073
|
+
...s.DnsConfig.RoutingPolicy !== void 0 && { RoutingPolicy: s.DnsConfig.RoutingPolicy },
|
|
12074
|
+
...s.DnsConfig.DnsRecords !== void 0 && { DnsRecords: s.DnsConfig.DnsRecords.map((d) => ({
|
|
12075
|
+
Type: d.Type,
|
|
12076
|
+
TTL: d.TTL
|
|
12077
|
+
})) }
|
|
12078
|
+
};
|
|
12079
|
+
}
|
|
11975
12080
|
if (s.HealthCheckConfig) model.HealthCheckConfig = {
|
|
11976
12081
|
...s.HealthCheckConfig.Type !== void 0 && { Type: s.HealthCheckConfig.Type },
|
|
11977
12082
|
...s.HealthCheckConfig.ResourcePath !== void 0 && { ResourcePath: s.HealthCheckConfig.ResourcePath },
|
|
@@ -17794,6 +17899,7 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
|
|
|
17794
17899
|
"AWS::EC2::NetworkInterface\0SourceDestCheck",
|
|
17795
17900
|
"AWS::EC2::Instance\0SourceDestCheck",
|
|
17796
17901
|
"AWS::EC2::Instance\0InstanceInitiatedShutdownBehavior",
|
|
17902
|
+
"AWS::EC2::Instance\0MetadataOptions",
|
|
17797
17903
|
"AWS::EC2::ClientVpnEndpoint\0VpnPort",
|
|
17798
17904
|
"AWS::EC2::ClientVpnEndpoint\0DisconnectOnSessionTimeout",
|
|
17799
17905
|
"AWS::EC2::ClientVpnEndpoint\0SessionTimeoutHours",
|
|
@@ -17808,6 +17914,7 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
|
|
|
17808
17914
|
"AWS::OpenSearchService::Domain\0DeploymentStrategyOptions",
|
|
17809
17915
|
"AWS::EKS::Cluster\0ResourcesVpcConfig.EndpointPrivateAccess",
|
|
17810
17916
|
"AWS::RDS::DBInstance\0AutoMinorVersionUpgrade",
|
|
17917
|
+
"AWS::RDS::DBInstance\0BackupRetentionPeriod",
|
|
17811
17918
|
"AWS::RDS::DBCluster\0AutoMinorVersionUpgrade",
|
|
17812
17919
|
"AWS::Neptune::DBInstance\0AutoMinorVersionUpgrade",
|
|
17813
17920
|
"AWS::ElastiCache::CacheCluster\0AutoMinorVersionUpgrade",
|