@go-to-k/cdkd 0.102.4 → 0.102.6
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 +202 -118
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5017,42 +5017,52 @@ var SNSTopicProvider = class {
|
|
|
5017
5017
|
};
|
|
5018
5018
|
const topicArn = (await this.snsClient.send(new CreateTopicCommand(createParams))).TopicArn;
|
|
5019
5019
|
if (!topicArn) throw new Error("CreateTopic did not return TopicArn");
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
AttributeName: "ArchivePolicy",
|
|
5025
|
-
AttributeValue: archivePolicy
|
|
5026
|
-
}));
|
|
5027
|
-
}
|
|
5028
|
-
if (properties["DataProtectionPolicy"]) {
|
|
5029
|
-
const dataProtectionPolicy = typeof properties["DataProtectionPolicy"] === "string" ? properties["DataProtectionPolicy"] : JSON.stringify(properties["DataProtectionPolicy"]);
|
|
5030
|
-
await this.snsClient.send(new SetTopicAttributesCommand({
|
|
5031
|
-
TopicArn: topicArn,
|
|
5032
|
-
AttributeName: "DataProtectionPolicy",
|
|
5033
|
-
AttributeValue: dataProtectionPolicy
|
|
5034
|
-
}));
|
|
5035
|
-
}
|
|
5036
|
-
if (properties["DeliveryStatusLogging"]) {
|
|
5037
|
-
const loggingConfigs = properties["DeliveryStatusLogging"];
|
|
5038
|
-
for (const config of loggingConfigs) {
|
|
5039
|
-
const protocol = normalizeDeliveryStatusProtocolOrThrow(config["Protocol"], logicalId);
|
|
5040
|
-
if (config["SuccessFeedbackRoleArn"]) await this.snsClient.send(new SetTopicAttributesCommand({
|
|
5041
|
-
TopicArn: topicArn,
|
|
5042
|
-
AttributeName: `${protocol}SuccessFeedbackRoleArn`,
|
|
5043
|
-
AttributeValue: config["SuccessFeedbackRoleArn"]
|
|
5044
|
-
}));
|
|
5045
|
-
if (config["SuccessFeedbackSampleRate"]) await this.snsClient.send(new SetTopicAttributesCommand({
|
|
5020
|
+
try {
|
|
5021
|
+
if (properties["ArchivePolicy"]) {
|
|
5022
|
+
const archivePolicy = typeof properties["ArchivePolicy"] === "string" ? properties["ArchivePolicy"] : JSON.stringify(properties["ArchivePolicy"]);
|
|
5023
|
+
await this.snsClient.send(new SetTopicAttributesCommand({
|
|
5046
5024
|
TopicArn: topicArn,
|
|
5047
|
-
AttributeName:
|
|
5048
|
-
AttributeValue:
|
|
5025
|
+
AttributeName: "ArchivePolicy",
|
|
5026
|
+
AttributeValue: archivePolicy
|
|
5049
5027
|
}));
|
|
5050
|
-
|
|
5028
|
+
}
|
|
5029
|
+
if (properties["DataProtectionPolicy"]) {
|
|
5030
|
+
const dataProtectionPolicy = typeof properties["DataProtectionPolicy"] === "string" ? properties["DataProtectionPolicy"] : JSON.stringify(properties["DataProtectionPolicy"]);
|
|
5031
|
+
await this.snsClient.send(new SetTopicAttributesCommand({
|
|
5051
5032
|
TopicArn: topicArn,
|
|
5052
|
-
AttributeName:
|
|
5053
|
-
AttributeValue:
|
|
5033
|
+
AttributeName: "DataProtectionPolicy",
|
|
5034
|
+
AttributeValue: dataProtectionPolicy
|
|
5054
5035
|
}));
|
|
5055
5036
|
}
|
|
5037
|
+
if (properties["DeliveryStatusLogging"]) {
|
|
5038
|
+
const loggingConfigs = properties["DeliveryStatusLogging"];
|
|
5039
|
+
for (const config of loggingConfigs) {
|
|
5040
|
+
const protocol = normalizeDeliveryStatusProtocolOrThrow(config["Protocol"], logicalId);
|
|
5041
|
+
if (config["SuccessFeedbackRoleArn"]) await this.snsClient.send(new SetTopicAttributesCommand({
|
|
5042
|
+
TopicArn: topicArn,
|
|
5043
|
+
AttributeName: `${protocol}SuccessFeedbackRoleArn`,
|
|
5044
|
+
AttributeValue: config["SuccessFeedbackRoleArn"]
|
|
5045
|
+
}));
|
|
5046
|
+
if (config["SuccessFeedbackSampleRate"]) await this.snsClient.send(new SetTopicAttributesCommand({
|
|
5047
|
+
TopicArn: topicArn,
|
|
5048
|
+
AttributeName: `${protocol}SuccessFeedbackSampleRate`,
|
|
5049
|
+
AttributeValue: stringifyValue(config["SuccessFeedbackSampleRate"])
|
|
5050
|
+
}));
|
|
5051
|
+
if (config["FailureFeedbackRoleArn"]) await this.snsClient.send(new SetTopicAttributesCommand({
|
|
5052
|
+
TopicArn: topicArn,
|
|
5053
|
+
AttributeName: `${protocol}FailureFeedbackRoleArn`,
|
|
5054
|
+
AttributeValue: config["FailureFeedbackRoleArn"]
|
|
5055
|
+
}));
|
|
5056
|
+
}
|
|
5057
|
+
}
|
|
5058
|
+
} catch (innerError) {
|
|
5059
|
+
try {
|
|
5060
|
+
await this.snsClient.send(new DeleteTopicCommand({ TopicArn: topicArn }));
|
|
5061
|
+
this.logger.debug(`Cleaned up partially-created SNS topic ${logicalId} (${topicArn}) after wiring failure`);
|
|
5062
|
+
} catch (cleanupError) {
|
|
5063
|
+
this.logger.warn(`Failed to clean up partially-created SNS topic ${logicalId} (${topicArn}): ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}. Manual deletion may be required before the next deploy: aws sns delete-topic --topic-arn ${topicArn}`);
|
|
5064
|
+
}
|
|
5065
|
+
throw innerError;
|
|
5056
5066
|
}
|
|
5057
5067
|
this.logger.debug(`Successfully created SNS topic ${logicalId}: ${topicArn}`);
|
|
5058
5068
|
return {
|
|
@@ -9118,13 +9128,36 @@ var EventBridgeRuleProvider = class {
|
|
|
9118
9128
|
if (properties["Tags"]) putRuleParams["Tags"] = properties["Tags"];
|
|
9119
9129
|
const ruleArn = (await this.eventBridgeClient.send(new PutRuleCommand(putRuleParams))).RuleArn;
|
|
9120
9130
|
this.logger.debug(`Created EventBridge rule: ${ruleName} (${ruleArn})`);
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9131
|
+
const eventBusName = properties["EventBusName"];
|
|
9132
|
+
try {
|
|
9133
|
+
if (targets && targets.length > 0) {
|
|
9134
|
+
await this.eventBridgeClient.send(new PutTargetsCommand({
|
|
9135
|
+
Rule: ruleName,
|
|
9136
|
+
EventBusName: eventBusName,
|
|
9137
|
+
Targets: targets
|
|
9138
|
+
}));
|
|
9139
|
+
this.logger.debug(`Added ${targets.length} targets to rule ${ruleName}`);
|
|
9140
|
+
}
|
|
9141
|
+
} catch (innerError) {
|
|
9142
|
+
try {
|
|
9143
|
+
const targetIds = ((await this.eventBridgeClient.send(new ListTargetsByRuleCommand({
|
|
9144
|
+
Rule: ruleName,
|
|
9145
|
+
EventBusName: eventBusName
|
|
9146
|
+
}))).Targets || []).map((t) => t.Id).filter((id) => id !== void 0);
|
|
9147
|
+
if (targetIds.length > 0) await this.eventBridgeClient.send(new RemoveTargetsCommand({
|
|
9148
|
+
Rule: ruleName,
|
|
9149
|
+
EventBusName: eventBusName,
|
|
9150
|
+
Ids: targetIds
|
|
9151
|
+
}));
|
|
9152
|
+
await this.eventBridgeClient.send(new DeleteRuleCommand({
|
|
9153
|
+
Name: ruleName,
|
|
9154
|
+
EventBusName: eventBusName
|
|
9155
|
+
}));
|
|
9156
|
+
this.logger.debug(`Cleaned up partially-created EventBridge rule ${logicalId} (${ruleName}) after wiring failure`);
|
|
9157
|
+
} catch (cleanupError) {
|
|
9158
|
+
this.logger.warn(`Failed to clean up partially-created EventBridge rule ${logicalId} (${ruleName}): ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}. Manual deletion may be required before the next deploy: aws events list-targets-by-rule --rule ${ruleName}${eventBusName ? ` --event-bus-name ${eventBusName}` : ""} | jq -r '.Targets[].Id' | xargs aws events remove-targets --rule ${ruleName}${eventBusName ? ` --event-bus-name ${eventBusName}` : ""} --ids; aws events delete-rule --name ${ruleName}${eventBusName ? ` --event-bus-name ${eventBusName}` : ""}`);
|
|
9159
|
+
}
|
|
9160
|
+
throw innerError;
|
|
9128
9161
|
}
|
|
9129
9162
|
return {
|
|
9130
9163
|
physicalId: ruleArn,
|
|
@@ -9844,27 +9877,37 @@ var EC2Provider = class {
|
|
|
9844
9877
|
CidrBlock: cidrBlock,
|
|
9845
9878
|
InstanceTenancy: properties["InstanceTenancy"] ?? void 0
|
|
9846
9879
|
}))).Vpc.VpcId;
|
|
9847
|
-
if (properties["EnableDnsHostnames"] === true || properties["EnableDnsHostnames"] === "true") await this.ec2Client.send(new ModifyVpcAttributeCommand({
|
|
9848
|
-
VpcId: vpcId,
|
|
9849
|
-
EnableDnsHostnames: { Value: true }
|
|
9850
|
-
}));
|
|
9851
|
-
if (properties["EnableDnsSupport"] === false || properties["EnableDnsSupport"] === "false") await this.ec2Client.send(new ModifyVpcAttributeCommand({
|
|
9852
|
-
VpcId: vpcId,
|
|
9853
|
-
EnableDnsSupport: { Value: false }
|
|
9854
|
-
}));
|
|
9855
|
-
await this.applyTags(vpcId, properties, logicalId);
|
|
9856
|
-
await this.ec2Client.send(new DescribeVpcsCommand({ VpcIds: [vpcId] }));
|
|
9857
9880
|
let defaultSgId = "";
|
|
9858
9881
|
try {
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
|
|
9862
|
-
}
|
|
9863
|
-
|
|
9864
|
-
|
|
9865
|
-
|
|
9866
|
-
|
|
9867
|
-
this.
|
|
9882
|
+
if (properties["EnableDnsHostnames"] === true || properties["EnableDnsHostnames"] === "true") await this.ec2Client.send(new ModifyVpcAttributeCommand({
|
|
9883
|
+
VpcId: vpcId,
|
|
9884
|
+
EnableDnsHostnames: { Value: true }
|
|
9885
|
+
}));
|
|
9886
|
+
if (properties["EnableDnsSupport"] === false || properties["EnableDnsSupport"] === "false") await this.ec2Client.send(new ModifyVpcAttributeCommand({
|
|
9887
|
+
VpcId: vpcId,
|
|
9888
|
+
EnableDnsSupport: { Value: false }
|
|
9889
|
+
}));
|
|
9890
|
+
await this.applyTags(vpcId, properties, logicalId);
|
|
9891
|
+
await this.ec2Client.send(new DescribeVpcsCommand({ VpcIds: [vpcId] }));
|
|
9892
|
+
try {
|
|
9893
|
+
defaultSgId = (await this.ec2Client.send(new DescribeSecurityGroupsCommand({ Filters: [{
|
|
9894
|
+
Name: "vpc-id",
|
|
9895
|
+
Values: [vpcId]
|
|
9896
|
+
}, {
|
|
9897
|
+
Name: "group-name",
|
|
9898
|
+
Values: ["default"]
|
|
9899
|
+
}] }))).SecurityGroups?.[0]?.GroupId || "";
|
|
9900
|
+
} catch {
|
|
9901
|
+
this.logger.debug(`Failed to get default SG for VPC ${vpcId}`);
|
|
9902
|
+
}
|
|
9903
|
+
} catch (innerError) {
|
|
9904
|
+
try {
|
|
9905
|
+
await this.ec2Client.send(new DeleteVpcCommand({ VpcId: vpcId }));
|
|
9906
|
+
this.logger.debug(`Cleaned up partially-created VPC ${logicalId} (${vpcId}) after wiring failure`);
|
|
9907
|
+
} catch (cleanupError) {
|
|
9908
|
+
this.logger.warn(`Failed to clean up partially-created VPC ${logicalId} (${vpcId}): ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}. Manual deletion may be required before the next deploy: aws ec2 delete-vpc --vpc-id ${vpcId}`);
|
|
9909
|
+
}
|
|
9910
|
+
throw innerError;
|
|
9868
9911
|
}
|
|
9869
9912
|
this.logger.debug(`Successfully created VPC ${logicalId}: ${vpcId}`);
|
|
9870
9913
|
return {
|
|
@@ -9995,12 +10038,22 @@ var EC2Provider = class {
|
|
|
9995
10038
|
}));
|
|
9996
10039
|
const subnetId = response.Subnet.SubnetId;
|
|
9997
10040
|
const availabilityZone = response.Subnet.AvailabilityZone;
|
|
9998
|
-
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
|
|
10041
|
+
try {
|
|
10042
|
+
await this.applyTags(subnetId, properties, logicalId);
|
|
10043
|
+
const mapPublicIp = properties["MapPublicIpOnLaunch"];
|
|
10044
|
+
if (mapPublicIp === true || mapPublicIp === "true") await this.ec2Client.send(new ModifySubnetAttributeCommand({
|
|
10045
|
+
SubnetId: subnetId,
|
|
10046
|
+
MapPublicIpOnLaunch: { Value: true }
|
|
10047
|
+
}));
|
|
10048
|
+
} catch (innerError) {
|
|
10049
|
+
try {
|
|
10050
|
+
await this.ec2Client.send(new DeleteSubnetCommand({ SubnetId: subnetId }));
|
|
10051
|
+
this.logger.debug(`Cleaned up partially-created Subnet ${logicalId} (${subnetId}) after wiring failure`);
|
|
10052
|
+
} catch (cleanupError) {
|
|
10053
|
+
this.logger.warn(`Failed to clean up partially-created Subnet ${logicalId} (${subnetId}): ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}. Manual deletion may be required before the next deploy: aws ec2 delete-subnet --subnet-id ${subnetId}`);
|
|
10054
|
+
}
|
|
10055
|
+
throw innerError;
|
|
10056
|
+
}
|
|
10004
10057
|
this.logger.debug(`Successfully created Subnet ${logicalId}: ${subnetId}`);
|
|
10005
10058
|
return {
|
|
10006
10059
|
physicalId: subnetId,
|
|
@@ -10379,29 +10432,39 @@ var EC2Provider = class {
|
|
|
10379
10432
|
Description: groupDescription,
|
|
10380
10433
|
VpcId: properties["VpcId"] ?? void 0
|
|
10381
10434
|
}))).GroupId;
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10435
|
+
try {
|
|
10436
|
+
await this.applyTags(groupId, properties, logicalId);
|
|
10437
|
+
const ingressRules = properties["SecurityGroupIngress"];
|
|
10438
|
+
if (ingressRules && Array.isArray(ingressRules)) for (const rule of ingressRules) await this.ec2Client.send(new AuthorizeSecurityGroupIngressCommand({
|
|
10439
|
+
GroupId: groupId,
|
|
10440
|
+
IpPermissions: [this.buildIpPermission(rule)]
|
|
10441
|
+
}));
|
|
10442
|
+
const egressRules = properties["SecurityGroupEgress"];
|
|
10443
|
+
if (egressRules && Array.isArray(egressRules)) {
|
|
10444
|
+
try {
|
|
10445
|
+
await this.ec2Client.send(new RevokeSecurityGroupEgressCommand({
|
|
10446
|
+
GroupId: groupId,
|
|
10447
|
+
IpPermissions: [{
|
|
10448
|
+
IpProtocol: "-1",
|
|
10449
|
+
IpRanges: [{ CidrIp: "0.0.0.0/0" }]
|
|
10450
|
+
}]
|
|
10451
|
+
}));
|
|
10452
|
+
} catch (error) {
|
|
10453
|
+
if (!this.isNotFoundError(error)) throw error;
|
|
10454
|
+
}
|
|
10455
|
+
for (const rule of egressRules) await this.ec2Client.send(new AuthorizeSecurityGroupEgressCommand({
|
|
10392
10456
|
GroupId: groupId,
|
|
10393
|
-
IpPermissions: [
|
|
10394
|
-
IpProtocol: "-1",
|
|
10395
|
-
IpRanges: [{ CidrIp: "0.0.0.0/0" }]
|
|
10396
|
-
}]
|
|
10457
|
+
IpPermissions: [this.buildIpPermission(rule, "egress")]
|
|
10397
10458
|
}));
|
|
10398
|
-
} catch (error) {
|
|
10399
|
-
if (!this.isNotFoundError(error)) throw error;
|
|
10400
10459
|
}
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10460
|
+
} catch (innerError) {
|
|
10461
|
+
try {
|
|
10462
|
+
await this.ec2Client.send(new DeleteSecurityGroupCommand({ GroupId: groupId }));
|
|
10463
|
+
this.logger.debug(`Cleaned up partially-created SecurityGroup ${logicalId} (${groupId}) after wiring failure`);
|
|
10464
|
+
} catch (cleanupError) {
|
|
10465
|
+
this.logger.warn(`Failed to clean up partially-created SecurityGroup ${logicalId} (${groupId}): ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}. Manual deletion may be required before the next deploy: aws ec2 delete-security-group --group-id ${groupId}`);
|
|
10466
|
+
}
|
|
10467
|
+
throw innerError;
|
|
10405
10468
|
}
|
|
10406
10469
|
this.logger.debug(`Successfully created SecurityGroup ${logicalId}: ${groupId}`);
|
|
10407
10470
|
return {
|
|
@@ -10606,26 +10669,36 @@ var EC2Provider = class {
|
|
|
10606
10669
|
}))).Instances?.[0];
|
|
10607
10670
|
if (!instance?.InstanceId) throw new Error("No instance ID returned from RunInstances");
|
|
10608
10671
|
const instanceId = instance.InstanceId;
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10672
|
+
try {
|
|
10673
|
+
await this.applyTags(instanceId, properties, logicalId);
|
|
10674
|
+
this.logger.debug(`Waiting for instance ${instanceId} to be running...`);
|
|
10675
|
+
await waitUntilInstanceRunning({
|
|
10676
|
+
client: this.ec2Client,
|
|
10677
|
+
maxWaitTime: 300
|
|
10678
|
+
}, { InstanceIds: [instanceId] });
|
|
10679
|
+
const runningInstance = (await this.ec2Client.send(new DescribeInstancesCommand({ InstanceIds: [instanceId] }))).Reservations?.[0]?.Instances?.[0];
|
|
10680
|
+
const attributes = {
|
|
10681
|
+
InstanceId: instanceId,
|
|
10682
|
+
PrivateIp: runningInstance?.PrivateIpAddress ?? "",
|
|
10683
|
+
PublicIp: runningInstance?.PublicIpAddress ?? "",
|
|
10684
|
+
PrivateDnsName: runningInstance?.PrivateDnsName ?? "",
|
|
10685
|
+
PublicDnsName: runningInstance?.PublicDnsName ?? "",
|
|
10686
|
+
AvailabilityZone: runningInstance?.Placement?.AvailabilityZone ?? ""
|
|
10687
|
+
};
|
|
10688
|
+
this.logger.debug(`Successfully created EC2 Instance ${logicalId}: ${instanceId}`);
|
|
10689
|
+
return {
|
|
10690
|
+
physicalId: instanceId,
|
|
10691
|
+
attributes
|
|
10692
|
+
};
|
|
10693
|
+
} catch (innerError) {
|
|
10694
|
+
try {
|
|
10695
|
+
await this.ec2Client.send(new TerminateInstancesCommand({ InstanceIds: [instanceId] }));
|
|
10696
|
+
this.logger.debug(`Terminate requested for partially-created EC2 Instance ${logicalId} (${instanceId}) after wiring failure (not waiting for terminated state)`);
|
|
10697
|
+
} catch (cleanupError) {
|
|
10698
|
+
this.logger.warn(`Failed to terminate partially-created EC2 Instance ${logicalId} (${instanceId}): ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}. THE INSTANCE IS STILL RUNNING AND BILLING. Manual termination required: aws ec2 terminate-instances --instance-ids ${instanceId}`);
|
|
10699
|
+
}
|
|
10700
|
+
throw innerError;
|
|
10701
|
+
}
|
|
10629
10702
|
} catch (error) {
|
|
10630
10703
|
if (error instanceof ProvisioningError) throw error;
|
|
10631
10704
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -15876,25 +15949,36 @@ var ELBv2Provider = class {
|
|
|
15876
15949
|
...tags.length > 0 && { Tags: tags }
|
|
15877
15950
|
}))).LoadBalancers?.[0];
|
|
15878
15951
|
if (!lb || !lb.LoadBalancerArn) throw new Error("CreateLoadBalancer did not return LoadBalancer ARN");
|
|
15879
|
-
|
|
15880
|
-
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
|
|
15884
|
-
|
|
15885
|
-
|
|
15886
|
-
|
|
15887
|
-
|
|
15888
|
-
|
|
15889
|
-
|
|
15952
|
+
const lbArn = lb.LoadBalancerArn;
|
|
15953
|
+
this.logger.debug(`Successfully created LoadBalancer ${logicalId}: ${lbArn}`);
|
|
15954
|
+
try {
|
|
15955
|
+
const lbAttributes = properties["LoadBalancerAttributes"];
|
|
15956
|
+
if (lbAttributes && lbAttributes.length > 0) {
|
|
15957
|
+
await this.getClient().send(new ModifyLoadBalancerAttributesCommand({
|
|
15958
|
+
LoadBalancerArn: lbArn,
|
|
15959
|
+
Attributes: lbAttributes.map((attr) => ({
|
|
15960
|
+
Key: attr.Key,
|
|
15961
|
+
Value: attr.Value
|
|
15962
|
+
}))
|
|
15963
|
+
}));
|
|
15964
|
+
this.logger.debug(`Applied ${lbAttributes.length} LoadBalancer attributes for ${logicalId}`);
|
|
15965
|
+
}
|
|
15966
|
+
} catch (innerError) {
|
|
15967
|
+
try {
|
|
15968
|
+
await this.getClient().send(new DeleteLoadBalancerCommand({ LoadBalancerArn: lbArn }));
|
|
15969
|
+
this.logger.debug(`Cleaned up partially-created LoadBalancer ${logicalId} (${lbArn}) after wiring failure`);
|
|
15970
|
+
} catch (cleanupError) {
|
|
15971
|
+
this.logger.warn(`Failed to clean up partially-created LoadBalancer ${logicalId} (${lbArn}): ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}. Manual deletion may be required before the next deploy: aws elbv2 delete-load-balancer --load-balancer-arn ${lbArn}`);
|
|
15972
|
+
}
|
|
15973
|
+
throw innerError;
|
|
15890
15974
|
}
|
|
15891
15975
|
return {
|
|
15892
|
-
physicalId:
|
|
15976
|
+
physicalId: lbArn,
|
|
15893
15977
|
attributes: {
|
|
15894
15978
|
DNSName: lb.DNSName,
|
|
15895
15979
|
CanonicalHostedZoneID: lb.CanonicalHostedZoneId,
|
|
15896
|
-
LoadBalancerArn:
|
|
15897
|
-
LoadBalancerFullName:
|
|
15980
|
+
LoadBalancerArn: lbArn,
|
|
15981
|
+
LoadBalancerFullName: lbArn.split("/").slice(1).join("/"),
|
|
15898
15982
|
LoadBalancerName: lb.LoadBalancerName
|
|
15899
15983
|
}
|
|
15900
15984
|
};
|
|
@@ -42825,7 +42909,7 @@ function reorderArgs(argv) {
|
|
|
42825
42909
|
*/
|
|
42826
42910
|
async function main() {
|
|
42827
42911
|
const program = new Command();
|
|
42828
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.102.
|
|
42912
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.102.6");
|
|
42829
42913
|
program.addCommand(createBootstrapCommand());
|
|
42830
42914
|
program.addCommand(createSynthCommand());
|
|
42831
42915
|
program.addCommand(createListCommand());
|