cdk-real-drift 0.2.32 → 0.2.34

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
@@ -1284,6 +1284,7 @@ const KNOWN_DEFAULTS = {
1284
1284
  DisableExecuteApiEndpoint: false
1285
1285
  },
1286
1286
  "AWS::ApiGateway::DomainName": { SecurityPolicy: "TLS_1_2" },
1287
+ "AWS::ApiGateway::GatewayResponse": { ResponseTemplates: { "application/json": "{\"message\":$context.error.messageString}" } },
1287
1288
  "AWS::EC2::VPC": {
1288
1289
  InstanceTenancy: "default",
1289
1290
  EnableDnsSupport: true
@@ -1337,11 +1338,16 @@ const KNOWN_DEFAULTS = {
1337
1338
  EncryptionConfiguration: { EncryptionType: "AES256" },
1338
1339
  ImageTagMutability: "MUTABLE"
1339
1340
  },
1341
+ "AWS::ECR::RepositoryCreationTemplate": {
1342
+ EncryptionConfiguration: { EncryptionType: "AES256" },
1343
+ ImageTagMutability: "MUTABLE"
1344
+ },
1340
1345
  "AWS::Kinesis::Stream": { MaxRecordSizeInKiB: 1024 },
1341
1346
  "AWS::SSM::Parameter": {
1342
1347
  DataType: "text",
1343
1348
  Tier: "Standard"
1344
1349
  },
1350
+ "AWS::SSM::ResourceDataSync": { SyncType: "SyncToDestination" },
1345
1351
  "AWS::StepFunctions::Activity": { EncryptionConfiguration: { Type: "AWS_OWNED_KEY" } },
1346
1352
  "AWS::SNS::Subscription": { FilterPolicyScope: "MessageAttributes" },
1347
1353
  "AWS::Cognito::UserPool": {
@@ -1361,7 +1367,8 @@ const KNOWN_DEFAULTS = {
1361
1367
  SignInPolicy: { AllowedFirstAuthFactors: ["PASSWORD"] }
1362
1368
  },
1363
1369
  KeyConfiguration: { KeyType: "AWS_OWNED_KEY" },
1364
- IssuerConfiguration: { Type: "ORIGINAL" }
1370
+ IssuerConfiguration: { Type: "ORIGINAL" },
1371
+ WebAuthnFactorConfiguration: "SINGLE_FACTOR"
1365
1372
  },
1366
1373
  "AWS::Cognito::IdentityPool": { AllowClassicFlow: false },
1367
1374
  "AWS::Cognito::UserPoolClient": {
@@ -1707,6 +1714,7 @@ const KNOWN_DEFAULTS = {
1707
1714
  };
1708
1715
  const KNOWN_DEFAULT_ONE_OF = { "AWS::ApiGatewayV2::Integration": { TimeoutInMillis: [29e3, 3e4] } };
1709
1716
  const KNOWN_DEFAULT_PATHS = {
1717
+ "AWS::ElasticLoadBalancingV2::TargetGroup": { "Targets.*.AvailabilityZone": "all" },
1710
1718
  "AWS::ApiGatewayV2::Stage": { "DefaultRouteSettings.LoggingLevel": "OFF" },
1711
1719
  "AWS::ServiceCatalog::CloudFormationProduct": { "ProvisioningArtifactParameters.*.Type": "CLOUD_FORMATION_TEMPLATE" },
1712
1720
  "AWS::KinesisAnalyticsV2::Application": { "ApplicationConfiguration.ApplicationEncryptionConfiguration": { KeyType: "AWS_OWNED_KEY" } },
@@ -2143,6 +2151,7 @@ function ebOptionSettingTier(namespace, optionName, value, envType) {
2143
2151
  return "undeclared";
2144
2152
  }
2145
2153
  const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
2154
+ "AWS::Batch::JobQueue": new Set(["JobQueueType"]),
2146
2155
  "AWS::ECS::Service": new Set(["AvailabilityZoneRebalancing", "PlatformVersion"]),
2147
2156
  "AWS::KinesisAnalyticsV2::Application": new Set(["ApplicationMaintenanceConfiguration"]),
2148
2157
  "AWS::ElasticBeanstalk::ConfigurationTemplate": new Set(["PlatformArn"]),
@@ -2317,6 +2326,8 @@ const ELB_ATTRIBUTE_DEFAULTS = {
2317
2326
  },
2318
2327
  "AWS::ElasticLoadBalancingV2::Listener": { "routing.http.response.server.enabled": "true" },
2319
2328
  "AWS::ElasticLoadBalancingV2::TargetGroup": {
2329
+ "deregistration_delay.timeout_seconds": "300",
2330
+ "lambda.multi_value_headers.enabled": "false",
2320
2331
  "load_balancing.algorithm.anomaly_mitigation": "off",
2321
2332
  "load_balancing.algorithm.type": "round_robin",
2322
2333
  "load_balancing.cross_zone.enabled": "use_load_balancer_configuration",
@@ -2698,6 +2709,7 @@ function alignNameValueSubset(declared, live, spec) {
2698
2709
  return live.filter((e) => !dm.has(e[spec.nameField]));
2699
2710
  }
2700
2711
  const UNORDERED_ARRAY_PROPS = {
2712
+ "AWS::CloudFront::Distribution": new Set(["DistributionConfig.Restrictions.GeoRestriction.Locations"]),
2701
2713
  "AWS::Cognito::UserPoolClient": new Set([
2702
2714
  "AllowedOAuthFlows",
2703
2715
  "AllowedOAuthScopes",
@@ -3953,12 +3965,59 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
3953
3965
  Encrypted: true,
3954
3966
  AvailabilityZoneRelocationStatus: "enabled"
3955
3967
  };
3968
+ if (resourceType === "AWS::ElasticLoadBalancingV2::TargetGroup") {
3969
+ const targetType = declaredIn?.["TargetType"];
3970
+ const protocolVersion = declaredIn?.["ProtocolVersion"] ?? live["ProtocolVersion"];
3971
+ knownDef = {
3972
+ ...knownDef,
3973
+ HealthyThresholdCount: 5,
3974
+ HealthCheckIntervalSeconds: targetType === "lambda" ? 35 : 30,
3975
+ HealthCheckPath: protocolVersion === "GRPC" ? "/AWS.ALB/healthcheck" : "/",
3976
+ ...targetType === "lambda" ? { HealthCheckTimeoutSeconds: 30 } : {},
3977
+ ...protocolVersion === "GRPC" ? { Matcher: { GrpcCode: "12" } } : {}
3978
+ };
3979
+ }
3956
3980
  const genDef = resolveGeneratedDefault(resourceType, physicalId) ?? {};
3957
3981
  let knownDefPaths = KNOWN_DEFAULT_PATHS[resourceType] ?? {};
3958
3982
  if (resourceType === "AWS::Lambda::Function" && "DurableConfig" in declared) knownDefPaths = {
3959
3983
  ...knownDefPaths,
3960
3984
  "LoggingConfig.LogFormat": "JSON"
3961
3985
  };
3986
+ if (resourceType === "AWS::ApiGateway::RestApi") {
3987
+ const types = declared["EndpointConfiguration"]?.["Types"];
3988
+ if (Array.isArray(types) && types.includes("PRIVATE")) {
3989
+ knownDef = {
3990
+ ...knownDef,
3991
+ SecurityPolicy: "TLS_1_2"
3992
+ };
3993
+ knownDefPaths = {
3994
+ ...knownDefPaths,
3995
+ "EndpointConfiguration.IpAddressType": "dualstack"
3996
+ };
3997
+ }
3998
+ }
3999
+ if (resourceType === "AWS::Cognito::UserPool") {
4000
+ const tpvd = (declared["Policies"]?.["PasswordPolicy"])?.["TemporaryPasswordValidityDays"];
4001
+ knownDefPaths = {
4002
+ ...knownDefPaths,
4003
+ "AdminCreateUserConfig.UnusedAccountValidityDays": tpvd ?? 7
4004
+ };
4005
+ }
4006
+ if (resourceType === "AWS::SSM::ResourceDataSync") {
4007
+ const s3 = declared["S3Destination"];
4008
+ if (s3 && typeof s3 === "object") {
4009
+ const twins = {};
4010
+ for (const key of [
4011
+ "BucketName",
4012
+ "BucketRegion",
4013
+ "SyncFormat"
4014
+ ]) if (key in s3) twins[key] = s3[key];
4015
+ knownDef = {
4016
+ ...knownDef,
4017
+ ...twins
4018
+ };
4019
+ }
4020
+ }
3962
4021
  const generatedPaths = GENERATED_PATHS[resourceType] ?? [];
3963
4022
  const generatedNestedPaths = GENERATED_NESTED_PATHS[resourceType];
3964
4023
  const freeFormMapPaths = schema.freeFormMapPaths ?? [];