cdk-real-drift 0.12.102 → 0.12.104

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
@@ -2085,6 +2085,9 @@ const KNOWN_DEFAULTS = {
2085
2085
  },
2086
2086
  "AWS::KinesisAnalyticsV2::Application": { ApplicationMode: "STREAMING" },
2087
2087
  "AWS::Events::ApiDestination": { InvocationRateLimitPerSecond: 300 },
2088
+ "AWS::DMS::Endpoint": { SslMode: "none" },
2089
+ "AWS::CloudFormation::StackSet": { ExecutionRoleName: "AWSCloudFormationStackSetExecutionRole" },
2090
+ "AWS::Batch::ComputeEnvironment": { State: "ENABLED" },
2088
2091
  "AWS::ElasticBeanstalk::Application": { ResourceLifecycleConfig: { VersionLifecycleConfig: {
2089
2092
  MaxCountRule: {
2090
2093
  DeleteSourceFromS3: false,
@@ -2512,6 +2515,7 @@ const KNOWN_DEFAULTS = {
2512
2515
  AutoMinorVersionUpgrade: true,
2513
2516
  BackupTarget: "region",
2514
2517
  DatabaseInsightsMode: "standard",
2518
+ DBSubnetGroupName: "default",
2515
2519
  MonitoringInterval: 0,
2516
2520
  NetworkType: "IPV4",
2517
2521
  StorageThroughput: 0,
@@ -2530,6 +2534,7 @@ const KNOWN_DEFAULTS = {
2530
2534
  DatabaseInsightsMode: "standard",
2531
2535
  NetworkType: "IPV4",
2532
2536
  EngineMode: "provisioned",
2537
+ DBSubnetGroupName: "default",
2533
2538
  BackupRetentionPeriod: 1
2534
2539
  },
2535
2540
  "AWS::Neptune::DBInstance": { AutoMinorVersionUpgrade: true },
@@ -2842,7 +2847,8 @@ const KNOWN_DEFAULT_ONE_OF = {
2842
2847
  };
2843
2848
  const KNOWN_DEFAULT_ONE_OF_PATHS = {
2844
2849
  "AWS::EKS::Cluster": { "KubernetesNetworkConfig.ServiceIpv4Cidr": ["10.100.0.0/16", "172.20.0.0/16"] },
2845
- "AWS::S3::Bucket": { "LifecycleConfiguration.TransitionDefaultMinimumObjectSize": ["all_storage_classes_128K", "varies_by_storage_class"] }
2850
+ "AWS::S3::Bucket": { "LifecycleConfiguration.TransitionDefaultMinimumObjectSize": ["all_storage_classes_128K", "varies_by_storage_class"] },
2851
+ "AWS::Batch::ComputeEnvironment": { "ComputeResources.Ec2Configuration": [[{ ImageType: "ECS_AL2023" }], [{ ImageType: "ECS_AL2" }]] }
2846
2852
  };
2847
2853
  const KNOWN_DEFAULT_PATHS = {
2848
2854
  "AWS::ElasticLoadBalancingV2::TargetGroup": { "Targets.*.AvailabilityZone": "all" },
@@ -3140,6 +3146,7 @@ const CONTEXT_ARN_DEFAULTS = {
3140
3146
  "AWS::ResourceExplorer2::View": { Scope: "arn:{partition}:iam::{accountId}:root" },
3141
3147
  "AWS::KinesisVideo::Stream": { KmsKeyId: "arn:{partition}:kms:{region}:{accountId}:alias/aws/kinesisvideo" },
3142
3148
  "AWS::AutoScaling::AutoScalingGroup": { ServiceLinkedRoleARN: "arn:{partition}:iam::{accountId}:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling" },
3149
+ "AWS::CloudFormation::StackSet": { AdministrationRoleARN: "arn:{partition}:iam::{accountId}:role/AWSCloudFormationStackSetAdministrationRole" },
3143
3150
  "AWS::Batch::ComputeEnvironment": { ServiceRole: "arn:{partition}:iam::{accountId}:role/aws-service-role/batch.amazonaws.com/AWSServiceRoleForBatch" },
3144
3151
  "AWS::CodeBuild::Project": { EncryptionKey: "arn:{partition}:kms:{region}:{accountId}:alias/aws/s3" },
3145
3152
  "AWS::SSM::MaintenanceWindowTask": { ServiceRoleArn: "arn:{partition}:iam::{accountId}:role/aws-service-role/ssm.amazonaws.com/AWSServiceRoleForAmazonSSM" },
@@ -3154,7 +3161,8 @@ const ENGINE_DEFAULTS = {
3154
3161
  StorageType: (e) => e.startsWith("aurora") ? "aurora" : "gp2",
3155
3162
  AllocatedStorage: (e) => e.startsWith("aurora") ? 1 : void 0,
3156
3163
  Port: rdsDefaultPort,
3157
- LicenseModel: rdsDefaultLicense
3164
+ LicenseModel: rdsDefaultLicense,
3165
+ CharacterSetName: (e) => /sqlserver/.test(e) ? "SQL_Latin1_General_CP1_CI_AS" : void 0
3158
3166
  },
3159
3167
  "AWS::RDS::DBCluster": {
3160
3168
  StorageType: (e) => e.startsWith("aurora") ? "aurora" : void 0,
@@ -3176,12 +3184,14 @@ function rdsDefaultPort(engine) {
3176
3184
  function rdsDefaultLicense(engine) {
3177
3185
  if (/postgres/.test(engine)) return "postgresql-license";
3178
3186
  if (/mysql|maria/.test(engine)) return "general-public-license";
3187
+ if (/sqlserver/.test(engine)) return "license-included";
3179
3188
  }
3180
3189
  const DEFAULT_MANAGED_NAME_PATHS = {
3181
3190
  "AWS::RDS::DBInstance": {
3182
3191
  DBParameterGroupName: /^default\./,
3183
3192
  OptionGroupName: /^default:/
3184
3193
  },
3194
+ "AWS::RDS::DBCluster": { DBClusterParameterGroupName: /^default\./ },
3185
3195
  "AWS::ElastiCache::CacheCluster": { CacheParameterGroupName: /^default\./ },
3186
3196
  "AWS::DocDB::DBCluster": { DBClusterParameterGroupName: /^default\./ },
3187
3197
  "AWS::Neptune::DBCluster": { DBClusterParameterGroupName: /^default\./ },
@@ -3394,6 +3404,7 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
3394
3404
  "AWS::ElasticLoadBalancing::LoadBalancer": new Set(["AvailabilityZones"]),
3395
3405
  "AWS::AutoScaling::AutoScalingGroup": new Set(["AvailabilityZones", "AvailabilityZoneIds"]),
3396
3406
  "AWS::ApiGateway::Authorizer": new Set(["AuthType"]),
3407
+ "AWS::DMS::Endpoint": new Set(["KmsKeyId"]),
3397
3408
  "AWS::RDS::DBCluster": new Set([
3398
3409
  "KmsKeyId",
3399
3410
  "EngineVersion",
@@ -3455,6 +3466,8 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
3455
3466
  ]),
3456
3467
  "AWS::OpenSearchService::Domain": new Set(["OffPeakWindowOptions"]),
3457
3468
  "AWS::AmazonMQ::Broker": new Set(["MaintenanceWindowStartTime", "SubnetIds"]),
3469
+ "AWS::EC2::InstanceConnectEndpoint": new Set(["SecurityGroupIds"]),
3470
+ "AWS::EC2::EIPAssociation": new Set(["PrivateIpAddress", "EIP"]),
3458
3471
  "AWS::EC2::Instance": new Set([
3459
3472
  "PrivateIpAddress",
3460
3473
  "CpuOptions",
@@ -3706,7 +3719,7 @@ const CASE_INSENSITIVE_PATHS = {
3706
3719
  "AWS::Neptune::DBSubnetGroup": new Set(["DBSubnetGroupName"]),
3707
3720
  "AWS::DMS::ReplicationInstance": new Set(["ReplicationInstanceIdentifier"]),
3708
3721
  "AWS::DMS::ReplicationSubnetGroup": new Set(["ReplicationSubnetGroupIdentifier"]),
3709
- "AWS::DMS::Endpoint": new Set(["EndpointType"]),
3722
+ "AWS::DMS::Endpoint": new Set(["EndpointType", "EndpointIdentifier"]),
3710
3723
  "AWS::WAFv2::LoggingConfiguration": new Set(["RedactedFields.*.SingleHeader.Name"]),
3711
3724
  "AWS::ElasticLoadBalancing::LoadBalancer": new Set(["Listeners.*.Protocol", "Listeners.*.InstanceProtocol"]),
3712
3725
  "AWS::EC2::SecurityGroup": new Set(["SecurityGroupIngress.*.IpProtocol", "SecurityGroupEgress.*.IpProtocol"]),
@@ -4156,6 +4169,7 @@ function alignNameValueSubset(declared, live, spec) {
4156
4169
  const UNORDERED_ARRAY_PROPS = {
4157
4170
  "AWS::CloudFront::Distribution": new Set(["DistributionConfig.Restrictions.GeoRestriction.Locations"]),
4158
4171
  "AWS::Cognito::UserPool": new Set(["EnabledMfas"]),
4172
+ "AWS::ECS::Cluster": new Set(["CapacityProviders"]),
4159
4173
  "AWS::Cognito::UserPoolClient": new Set([
4160
4174
  "AllowedOAuthFlows",
4161
4175
  "AllowedOAuthScopes",
@@ -5593,6 +5607,9 @@ const DEFAULT_SG_LIST_PATHS = {
5593
5607
  "AWS::ElasticLoadBalancingV2::LoadBalancer": "SecurityGroups",
5594
5608
  "AWS::EC2::NetworkInterface": "GroupSet",
5595
5609
  "AWS::Neptune::DBCluster": "VpcSecurityGroupIds",
5610
+ "AWS::RDS::DBCluster": "VpcSecurityGroupIds",
5611
+ "AWS::RDS::DBInstance": "VPCSecurityGroups",
5612
+ "AWS::DocDB::DBCluster": "VpcSecurityGroupIds",
5596
5613
  "AWS::AmazonMQ::Broker": "SecurityGroups",
5597
5614
  "AWS::RedshiftServerless::Workgroup": "SecurityGroupIds",
5598
5615
  "AWS::EC2::Instance": "SecurityGroupIds"
@@ -6476,6 +6493,13 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
6476
6493
  for (const src of Object.values(SHAPE_ECHO_TWIN[resourceType] ?? {})) if (isNestedObject(declared[src])) twinSources[src] = declared[src];
6477
6494
  const sfnDefinitionObject = resourceType === "AWS::StepFunctions::StateMachine" && isNestedObject(declared["Definition"]) ? declared["Definition"] : void 0;
6478
6495
  const sfnDefinitionSubstitutions = resourceType === "AWS::StepFunctions::StateMachine" && isNestedObject(declared["DefinitionSubstitutions"]) ? declared["DefinitionSubstitutions"] : void 0;
6496
+ const elastiCacheRgDeclaredShape = resourceType === "AWS::ElastiCache::ReplicationGroup" ? {
6497
+ NumNodeGroups: declared["NumNodeGroups"],
6498
+ NodeGroupConfiguration: declared["NodeGroupConfiguration"],
6499
+ ReplicasPerNodeGroup: declared["ReplicasPerNodeGroup"],
6500
+ ClusterMode: declared["ClusterMode"],
6501
+ Engine: declared["Engine"]
6502
+ } : void 0;
6479
6503
  deepStripPaths(declared, schema.writeOnlyPaths);
6480
6504
  if (sfnDefinitionSubstitutions !== void 0 && typeof declared["DefinitionString"] === "string") declared["DefinitionString"] = applyDefinitionSubstitutions(declared["DefinitionString"], sfnDefinitionSubstitutions);
6481
6505
  if (resourceType === "AWS::ServiceCatalogAppRegistry::AttributeGroupAssociation" && typeof physicalId === "string") {
@@ -7246,7 +7270,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
7246
7270
  continue;
7247
7271
  }
7248
7272
  if (resourceType === "AWS::ElastiCache::ReplicationGroup") {
7249
- const rgDerived = elastiCacheReplicationGroupDerivedDefault(k, declared);
7273
+ const rgDerived = elastiCacheReplicationGroupDerivedDefault(k, elastiCacheRgDeclaredShape ?? declared);
7250
7274
  if (rgDerived !== void 0) {
7251
7275
  findings.push({
7252
7276
  tier: matchesKnownDefault(v, rgDerived.value) ? "atDefault" : "undeclared",