cdk-real-drift 0.2.36 → 0.2.38

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 CHANGED
@@ -1308,7 +1308,19 @@ const KNOWN_DEFAULTS = {
1308
1308
  "AWS::EC2::Instance": {
1309
1309
  Tenancy: "default",
1310
1310
  SourceDestCheck: true,
1311
- InstanceInitiatedShutdownBehavior: "stop"
1311
+ InstanceInitiatedShutdownBehavior: "stop",
1312
+ MetadataOptions: {
1313
+ HttpTokens: "required",
1314
+ HttpPutResponseHopLimit: 2,
1315
+ HttpProtocolIpv6: "disabled",
1316
+ InstanceMetadataTags: "disabled",
1317
+ HttpEndpoint: "enabled"
1318
+ },
1319
+ PrivateDnsNameOptions: {
1320
+ HostnameType: "ip-name",
1321
+ EnableResourceNameDnsARecord: false,
1322
+ EnableResourceNameDnsAAAARecord: false
1323
+ }
1312
1324
  },
1313
1325
  "AWS::ApiGatewayV2::Api": {
1314
1326
  RouteSelectionExpression: "$request.method $request.path",
@@ -2285,7 +2297,12 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
2285
2297
  "AWS::OpenSearchService::Domain": new Set(["OffPeakWindowOptions"]),
2286
2298
  "AWS::AmazonMQ::Broker": new Set(["MaintenanceWindowStartTime"]),
2287
2299
  "AWS::EC2::Instance": new Set(["PrivateIpAddress"]),
2288
- "AWS::EC2::NetworkInterface": new Set(["PrivateIpAddress"]),
2300
+ "AWS::EC2::NetworkInterface": new Set([
2301
+ "PrivateIpAddress",
2302
+ "PrivateIpAddresses",
2303
+ "GroupSet"
2304
+ ]),
2305
+ "AWS::EC2::Volume": new Set(["KmsKeyId", "AvailabilityZoneId"]),
2289
2306
  "AWS::EC2::NatGateway": new Set(["PrivateIpAddress", "VpcId"]),
2290
2307
  "AWS::EFS::MountTarget": new Set(["IpAddress"]),
2291
2308
  "AWS::EC2::EIP": new Set(["NetworkBorderGroup", "NetworkInterfaceId"]),
@@ -4076,6 +4093,13 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4076
4093
  ...knownDefPaths,
4077
4094
  "LoggingConfig.LogFormat": "JSON"
4078
4095
  };
4096
+ if (resourceType === "AWS::Lambda::Function") {
4097
+ const genLogGroup = genDef["LoggingConfig"]?.["LogGroup"];
4098
+ if (typeof genLogGroup === "string") knownDefPaths = {
4099
+ ...knownDefPaths,
4100
+ "LoggingConfig.LogGroup": genLogGroup
4101
+ };
4102
+ }
4079
4103
  if (resourceType === "AWS::Glue::Schema") {
4080
4104
  const arn = declared["Registry"]?.["Arn"];
4081
4105
  if (typeof arn === "string") {
@@ -4154,7 +4178,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4154
4178
  const emitNested = (path, value) => {
4155
4179
  if (isAllAwsTags(value) || isTrivialEmpty(value)) return;
4156
4180
  const schemaPath = path.replace(/\[[^\]]*\]/g, ".*");
4157
- const tier = schemaPath in schema.defaultPaths && matchesKnownDefault(value, schema.defaultPaths[schemaPath]) || schemaPath in knownDefPaths && matchesKnownDefault(value, knownDefPaths[schemaPath]) || dynamoGsiWarmThroughputAtDefault(resourceType, path, value, live) ? "atDefault" : generatedPaths.includes(schemaPath) && isPhysicalIdSegment(value, physicalId) || generatedNestedPaths?.has(schemaPath) ? "generated" : "undeclared";
4181
+ const tier = schemaPath in schema.defaultPaths && matchesKnownDefault(value, schema.defaultPaths[schemaPath]) || schemaPath in knownDefPaths && matchesKnownDefault(value, knownDefPaths[schemaPath]) || dynamoGsiWarmThroughputAtDefault(resourceType, path, value, live) ? "atDefault" : generatedPaths.includes(schemaPath) && isPhysicalIdSegment(value, physicalId) || generatedNestedPaths?.has(schemaPath) && !(schemaPath in knownDefPaths) ? "generated" : "undeclared";
4158
4182
  const freeFormKey = tier === "undeclared" && underFreeFormMap(schemaPath);
4159
4183
  findings.push({
4160
4184
  tier,
@@ -10829,6 +10853,7 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
10829
10853
  "AWS::Cognito::UserPool\0DeletionProtection",
10830
10854
  "AWS::Cognito::UserPool\0MfaConfiguration",
10831
10855
  "AWS::Cognito::UserPool\0UserPoolTier",
10856
+ "AWS::Cognito::UserPool\0Policies",
10832
10857
  "AWS::SNS::Subscription\0FilterPolicyScope",
10833
10858
  "AWS::InternetMonitor::Monitor\0Status",
10834
10859
  "AWS::RolesAnywhere::Profile\0DurationSeconds",