@go-to-k/cdkd 0.59.0 → 0.59.1
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 +29 -4
- package/dist/cli.js.map +2 -2
- package/dist/go-to-k-cdkd-0.59.1.tgz +0 -0
- package/dist/index.js +25 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.59.0.tgz +0 -0
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -4852,7 +4852,10 @@ import { GetFunctionUrlConfigCommand } from "@aws-sdk/client-lambda";
|
|
|
4852
4852
|
|
|
4853
4853
|
// src/deployment/intrinsic-function-resolver.ts
|
|
4854
4854
|
import { GetCallerIdentityCommand as GetCallerIdentityCommand2 } from "@aws-sdk/client-sts";
|
|
4855
|
-
import {
|
|
4855
|
+
import {
|
|
4856
|
+
DescribeAvailabilityZonesCommand as DescribeAvailabilityZonesCommand2,
|
|
4857
|
+
DescribeLaunchTemplatesCommand
|
|
4858
|
+
} from "@aws-sdk/client-ec2";
|
|
4856
4859
|
import { GetSecretValueCommand } from "@aws-sdk/client-secrets-manager";
|
|
4857
4860
|
import { GetParameterCommand as GetParameterCommand2 } from "@aws-sdk/client-ssm";
|
|
4858
4861
|
init_aws_clients();
|
|
@@ -5328,6 +5331,27 @@ var IntrinsicFunctionResolver = class {
|
|
|
5328
5331
|
return physicalId;
|
|
5329
5332
|
}
|
|
5330
5333
|
}
|
|
5334
|
+
if (resourceType === "AWS::EC2::LaunchTemplate") {
|
|
5335
|
+
if (attributeName === "LatestVersionNumber" || attributeName === "DefaultVersionNumber") {
|
|
5336
|
+
try {
|
|
5337
|
+
const clients = getAwsClients();
|
|
5338
|
+
const response = await clients.ec2.send(
|
|
5339
|
+
new DescribeLaunchTemplatesCommand({ LaunchTemplateIds: [physicalId] })
|
|
5340
|
+
);
|
|
5341
|
+
const lt = response.LaunchTemplates?.[0];
|
|
5342
|
+
const value = attributeName === "LatestVersionNumber" ? lt?.LatestVersionNumber : lt?.DefaultVersionNumber;
|
|
5343
|
+
if (value !== void 0 && value !== null) {
|
|
5344
|
+
return String(value);
|
|
5345
|
+
}
|
|
5346
|
+
} catch (err) {
|
|
5347
|
+
this.logger.warn(
|
|
5348
|
+
`DescribeLaunchTemplates(${physicalId}) failed for ${attributeName}: ${err instanceof Error ? err.message : String(err)}`
|
|
5349
|
+
);
|
|
5350
|
+
}
|
|
5351
|
+
return attributeName === "LatestVersionNumber" ? "$Latest" : "$Default";
|
|
5352
|
+
}
|
|
5353
|
+
return physicalId;
|
|
5354
|
+
}
|
|
5331
5355
|
this.logger.warn(
|
|
5332
5356
|
`Unknown attribute ${attributeName} for resource type ${resourceType}, returning physical ID`
|
|
5333
5357
|
);
|