@go-to-k/cdkd 0.59.0 → 0.60.0

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.
Binary file
package/dist/index.js CHANGED
@@ -513,6 +513,32 @@ var FALLBACK_NAME_RULES = {
513
513
  nameProperty: "DBInstanceIdentifier",
514
514
  options: { maxLength: 63, lowercase: true }
515
515
  },
516
+ // DocumentDB — RDS-shaped API; same name constraints.
517
+ "AWS::DocDB::DBSubnetGroup": {
518
+ nameProperty: "DBSubnetGroupName",
519
+ options: { maxLength: 255, lowercase: true }
520
+ },
521
+ "AWS::DocDB::DBCluster": {
522
+ nameProperty: "DBClusterIdentifier",
523
+ options: { maxLength: 63, lowercase: true }
524
+ },
525
+ "AWS::DocDB::DBInstance": {
526
+ nameProperty: "DBInstanceIdentifier",
527
+ options: { maxLength: 63, lowercase: true }
528
+ },
529
+ // Neptune — RDS-shaped API; same name constraints.
530
+ "AWS::Neptune::DBSubnetGroup": {
531
+ nameProperty: "DBSubnetGroupName",
532
+ options: { maxLength: 255, lowercase: true }
533
+ },
534
+ "AWS::Neptune::DBCluster": {
535
+ nameProperty: "DBClusterIdentifier",
536
+ options: { maxLength: 63, lowercase: true }
537
+ },
538
+ "AWS::Neptune::DBInstance": {
539
+ nameProperty: "DBInstanceIdentifier",
540
+ options: { maxLength: 63, lowercase: true }
541
+ },
516
542
  "AWS::ElasticLoadBalancingV2::LoadBalancer": {
517
543
  nameProperty: "Name",
518
544
  options: { maxLength: 32 }
@@ -4852,7 +4878,10 @@ import { GetFunctionUrlConfigCommand } from "@aws-sdk/client-lambda";
4852
4878
 
4853
4879
  // src/deployment/intrinsic-function-resolver.ts
4854
4880
  import { GetCallerIdentityCommand as GetCallerIdentityCommand2 } from "@aws-sdk/client-sts";
4855
- import { DescribeAvailabilityZonesCommand as DescribeAvailabilityZonesCommand2 } from "@aws-sdk/client-ec2";
4881
+ import {
4882
+ DescribeAvailabilityZonesCommand as DescribeAvailabilityZonesCommand2,
4883
+ DescribeLaunchTemplatesCommand
4884
+ } from "@aws-sdk/client-ec2";
4856
4885
  import { GetSecretValueCommand } from "@aws-sdk/client-secrets-manager";
4857
4886
  import { GetParameterCommand as GetParameterCommand2 } from "@aws-sdk/client-ssm";
4858
4887
  init_aws_clients();
@@ -5328,6 +5357,27 @@ var IntrinsicFunctionResolver = class {
5328
5357
  return physicalId;
5329
5358
  }
5330
5359
  }
5360
+ if (resourceType === "AWS::EC2::LaunchTemplate") {
5361
+ if (attributeName === "LatestVersionNumber" || attributeName === "DefaultVersionNumber") {
5362
+ try {
5363
+ const clients = getAwsClients();
5364
+ const response = await clients.ec2.send(
5365
+ new DescribeLaunchTemplatesCommand({ LaunchTemplateIds: [physicalId] })
5366
+ );
5367
+ const lt = response.LaunchTemplates?.[0];
5368
+ const value = attributeName === "LatestVersionNumber" ? lt?.LatestVersionNumber : lt?.DefaultVersionNumber;
5369
+ if (value !== void 0 && value !== null) {
5370
+ return String(value);
5371
+ }
5372
+ } catch (err) {
5373
+ this.logger.warn(
5374
+ `DescribeLaunchTemplates(${physicalId}) failed for ${attributeName}: ${err instanceof Error ? err.message : String(err)}`
5375
+ );
5376
+ }
5377
+ return attributeName === "LatestVersionNumber" ? "$Latest" : "$Default";
5378
+ }
5379
+ return physicalId;
5380
+ }
5331
5381
  this.logger.warn(
5332
5382
  `Unknown attribute ${attributeName} for resource type ${resourceType}, returning physical ID`
5333
5383
  );