@go-to-k/cdkd 0.56.0 → 0.57.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.
- package/dist/cli.js +100 -26
- package/dist/cli.js.map +2 -2
- package/dist/go-to-k-cdkd-0.57.0.tgz +0 -0
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.56.0.tgz +0 -0
package/dist/cli.js
CHANGED
|
@@ -27859,6 +27859,10 @@ import {
|
|
|
27859
27859
|
DeleteLoadBalancerCommand,
|
|
27860
27860
|
DescribeLoadBalancersCommand as DescribeLoadBalancersCommand2,
|
|
27861
27861
|
DescribeLoadBalancerAttributesCommand,
|
|
27862
|
+
ModifyLoadBalancerAttributesCommand,
|
|
27863
|
+
SetSubnetsCommand,
|
|
27864
|
+
SetSecurityGroupsCommand,
|
|
27865
|
+
SetIpAddressTypeCommand,
|
|
27862
27866
|
CreateTargetGroupCommand,
|
|
27863
27867
|
DeleteTargetGroupCommand,
|
|
27864
27868
|
ModifyTargetGroupCommand,
|
|
@@ -27919,7 +27923,9 @@ var ELBv2Provider = class {
|
|
|
27919
27923
|
"DefaultActions",
|
|
27920
27924
|
"Port",
|
|
27921
27925
|
"Protocol",
|
|
27922
|
-
"SslPolicy"
|
|
27926
|
+
"SslPolicy",
|
|
27927
|
+
"AlpnPolicy",
|
|
27928
|
+
"MutualAuthentication"
|
|
27923
27929
|
])
|
|
27924
27930
|
]
|
|
27925
27931
|
]);
|
|
@@ -28027,7 +28033,6 @@ var ELBv2Provider = class {
|
|
|
28027
28033
|
this.logger.debug(`Successfully created LoadBalancer ${logicalId}: ${lb.LoadBalancerArn}`);
|
|
28028
28034
|
const lbAttributes = properties["LoadBalancerAttributes"];
|
|
28029
28035
|
if (lbAttributes && lbAttributes.length > 0) {
|
|
28030
|
-
const { ModifyLoadBalancerAttributesCommand } = await import("@aws-sdk/client-elastic-load-balancing-v2");
|
|
28031
28036
|
await this.getClient().send(
|
|
28032
28037
|
new ModifyLoadBalancerAttributesCommand({
|
|
28033
28038
|
LoadBalancerArn: lb.LoadBalancerArn,
|
|
@@ -28063,42 +28068,95 @@ var ELBv2Provider = class {
|
|
|
28063
28068
|
}
|
|
28064
28069
|
}
|
|
28065
28070
|
async updateLoadBalancer(logicalId, physicalId, _resourceType, properties, previousProperties) {
|
|
28066
|
-
const
|
|
28067
|
-
|
|
28068
|
-
|
|
28069
|
-
|
|
28070
|
-
|
|
28071
|
+
const handledKeys = /* @__PURE__ */ new Set([
|
|
28072
|
+
"LoadBalancerAttributes",
|
|
28073
|
+
"Subnets",
|
|
28074
|
+
"SubnetMappings",
|
|
28075
|
+
"SecurityGroups",
|
|
28076
|
+
"IpAddressType",
|
|
28077
|
+
"Tags"
|
|
28078
|
+
]);
|
|
28079
|
+
const stripHandled = (p) => {
|
|
28080
|
+
const out = {};
|
|
28081
|
+
for (const [k, v] of Object.entries(p)) {
|
|
28082
|
+
if (!handledKeys.has(k))
|
|
28083
|
+
out[k] = v;
|
|
28084
|
+
}
|
|
28085
|
+
return out;
|
|
28071
28086
|
};
|
|
28072
|
-
if (JSON.stringify(
|
|
28087
|
+
if (JSON.stringify(stripHandled(properties)) !== JSON.stringify(stripHandled(previousProperties))) {
|
|
28073
28088
|
throw new ResourceUpdateNotSupportedError(
|
|
28074
28089
|
"AWS::ElasticLoadBalancingV2::LoadBalancer",
|
|
28075
28090
|
logicalId,
|
|
28076
|
-
"ELBv2 LoadBalancer in-place updates are
|
|
28091
|
+
"ELBv2 LoadBalancer in-place updates are supported for LoadBalancerAttributes / Subnets / SubnetMappings / SecurityGroups / IpAddressType / Tags only; for Name / Type / Scheme, re-deploy with cdkd deploy --replace, or destroy + redeploy the stack"
|
|
28077
28092
|
);
|
|
28078
28093
|
}
|
|
28079
|
-
const
|
|
28080
|
-
const
|
|
28081
|
-
const
|
|
28082
|
-
|
|
28083
|
-
|
|
28084
|
-
|
|
28085
|
-
|
|
28086
|
-
|
|
28087
|
-
|
|
28088
|
-
|
|
28089
|
-
|
|
28090
|
-
|
|
28091
|
-
|
|
28094
|
+
const newAttrs = properties["LoadBalancerAttributes"] ?? [];
|
|
28095
|
+
const oldAttrs = previousProperties["LoadBalancerAttributes"] ?? [];
|
|
28096
|
+
const newAttrMap = new Map(newAttrs.map((a) => [a.Key, a.Value]));
|
|
28097
|
+
const oldAttrMap = new Map(oldAttrs.map((a) => [a.Key, a.Value]));
|
|
28098
|
+
const submittedAttrs = [];
|
|
28099
|
+
for (const [k, v] of newAttrMap) {
|
|
28100
|
+
if (oldAttrMap.get(k) !== v)
|
|
28101
|
+
submittedAttrs.push({ Key: k, Value: v });
|
|
28102
|
+
}
|
|
28103
|
+
for (const [k] of oldAttrMap) {
|
|
28104
|
+
if (!newAttrMap.has(k))
|
|
28105
|
+
submittedAttrs.push({ Key: k, Value: "" });
|
|
28106
|
+
}
|
|
28107
|
+
if (submittedAttrs.length > 0) {
|
|
28092
28108
|
await this.getClient().send(
|
|
28093
28109
|
new ModifyLoadBalancerAttributesCommand({
|
|
28094
28110
|
LoadBalancerArn: physicalId,
|
|
28095
|
-
Attributes:
|
|
28111
|
+
Attributes: submittedAttrs
|
|
28096
28112
|
})
|
|
28097
28113
|
);
|
|
28098
28114
|
this.logger.debug(
|
|
28099
|
-
`Applied ${
|
|
28115
|
+
`Applied ${submittedAttrs.length} LoadBalancerAttributes change(s) for ${logicalId}`
|
|
28100
28116
|
);
|
|
28101
28117
|
}
|
|
28118
|
+
const newSubnets = properties["Subnets"];
|
|
28119
|
+
const oldSubnets = previousProperties["Subnets"];
|
|
28120
|
+
const newMappings = properties["SubnetMappings"];
|
|
28121
|
+
const oldMappings = previousProperties["SubnetMappings"];
|
|
28122
|
+
const subnetsChanged = JSON.stringify(newSubnets) !== JSON.stringify(oldSubnets);
|
|
28123
|
+
const mappingsChanged = JSON.stringify(newMappings) !== JSON.stringify(oldMappings);
|
|
28124
|
+
if (subnetsChanged || mappingsChanged) {
|
|
28125
|
+
await this.getClient().send(
|
|
28126
|
+
new SetSubnetsCommand({
|
|
28127
|
+
LoadBalancerArn: physicalId,
|
|
28128
|
+
...newMappings && newMappings.length > 0 ? { SubnetMappings: newMappings } : { Subnets: newSubnets }
|
|
28129
|
+
})
|
|
28130
|
+
);
|
|
28131
|
+
this.logger.debug(`Updated Subnets / SubnetMappings for ${logicalId}`);
|
|
28132
|
+
}
|
|
28133
|
+
const newSGs = properties["SecurityGroups"];
|
|
28134
|
+
const oldSGs = previousProperties["SecurityGroups"];
|
|
28135
|
+
if (JSON.stringify(newSGs) !== JSON.stringify(oldSGs)) {
|
|
28136
|
+
await this.getClient().send(
|
|
28137
|
+
new SetSecurityGroupsCommand({
|
|
28138
|
+
LoadBalancerArn: physicalId,
|
|
28139
|
+
SecurityGroups: newSGs ?? []
|
|
28140
|
+
})
|
|
28141
|
+
);
|
|
28142
|
+
this.logger.debug(`Updated SecurityGroups for ${logicalId}`);
|
|
28143
|
+
}
|
|
28144
|
+
const newIpType = properties["IpAddressType"];
|
|
28145
|
+
const oldIpType = previousProperties["IpAddressType"];
|
|
28146
|
+
if (newIpType !== void 0 && newIpType !== oldIpType) {
|
|
28147
|
+
await this.getClient().send(
|
|
28148
|
+
new SetIpAddressTypeCommand({
|
|
28149
|
+
LoadBalancerArn: physicalId,
|
|
28150
|
+
IpAddressType: newIpType
|
|
28151
|
+
})
|
|
28152
|
+
);
|
|
28153
|
+
this.logger.debug(`Updated IpAddressType for ${logicalId}`);
|
|
28154
|
+
}
|
|
28155
|
+
await this.applyTagDiff(
|
|
28156
|
+
physicalId,
|
|
28157
|
+
previousProperties["Tags"],
|
|
28158
|
+
properties["Tags"]
|
|
28159
|
+
);
|
|
28102
28160
|
return { physicalId, wasReplaced: false };
|
|
28103
28161
|
}
|
|
28104
28162
|
async deleteLoadBalancer(logicalId, physicalId, resourceType, context) {
|
|
@@ -28270,6 +28328,8 @@ var ELBv2Provider = class {
|
|
|
28270
28328
|
const certificates = this.convertCertificates(
|
|
28271
28329
|
properties["Certificates"]
|
|
28272
28330
|
);
|
|
28331
|
+
const alpnPolicy = properties["AlpnPolicy"];
|
|
28332
|
+
const mutualAuth = properties["MutualAuthentication"];
|
|
28273
28333
|
const response = await this.getClient().send(
|
|
28274
28334
|
new CreateListenerCommand({
|
|
28275
28335
|
LoadBalancerArn: properties["LoadBalancerArn"],
|
|
@@ -28278,6 +28338,8 @@ var ELBv2Provider = class {
|
|
|
28278
28338
|
SslPolicy: properties["SslPolicy"],
|
|
28279
28339
|
DefaultActions: defaultActions ?? [],
|
|
28280
28340
|
...certificates && { Certificates: certificates },
|
|
28341
|
+
...alpnPolicy && alpnPolicy.length > 0 && { AlpnPolicy: alpnPolicy },
|
|
28342
|
+
...mutualAuth !== void 0 && { MutualAuthentication: mutualAuth },
|
|
28281
28343
|
...tags.length > 0 && { Tags: tags }
|
|
28282
28344
|
})
|
|
28283
28345
|
);
|
|
@@ -28312,6 +28374,8 @@ var ELBv2Provider = class {
|
|
|
28312
28374
|
const certificates = this.convertCertificates(
|
|
28313
28375
|
properties["Certificates"]
|
|
28314
28376
|
);
|
|
28377
|
+
const alpnPolicy = properties["AlpnPolicy"];
|
|
28378
|
+
const mutualAuth = properties["MutualAuthentication"];
|
|
28315
28379
|
await this.getClient().send(
|
|
28316
28380
|
new ModifyListenerCommand({
|
|
28317
28381
|
ListenerArn: physicalId,
|
|
@@ -28319,7 +28383,15 @@ var ELBv2Provider = class {
|
|
|
28319
28383
|
Protocol: properties["Protocol"],
|
|
28320
28384
|
SslPolicy: properties["SslPolicy"],
|
|
28321
28385
|
...defaultActions && { DefaultActions: defaultActions },
|
|
28322
|
-
...certificates && { Certificates: certificates }
|
|
28386
|
+
...certificates && { Certificates: certificates },
|
|
28387
|
+
// AlpnPolicy is a TLS-listener-only field; only forward it
|
|
28388
|
+
// when the diff actually carries values (CFn template-side it
|
|
28389
|
+
// is an array of one entry). An empty array would be rejected
|
|
28390
|
+
// by AWS on non-TLS listeners.
|
|
28391
|
+
...alpnPolicy && alpnPolicy.length > 0 && { AlpnPolicy: alpnPolicy },
|
|
28392
|
+
// MutualAuthentication is HTTPS-listener-only. Forward when
|
|
28393
|
+
// the user templated it; AWS will reject on non-HTTPS.
|
|
28394
|
+
...mutualAuth !== void 0 && { MutualAuthentication: mutualAuth }
|
|
28323
28395
|
})
|
|
28324
28396
|
);
|
|
28325
28397
|
await this.applyTagDiff(
|
|
@@ -28606,6 +28678,8 @@ var ELBv2Provider = class {
|
|
|
28606
28678
|
result["DefaultActions"] = (listener.DefaultActions ?? []).map(
|
|
28607
28679
|
(a) => a
|
|
28608
28680
|
);
|
|
28681
|
+
result["AlpnPolicy"] = listener.AlpnPolicy ?? [];
|
|
28682
|
+
result["MutualAuthentication"] = listener.MutualAuthentication ?? {};
|
|
28609
28683
|
await this.attachTags(result, physicalId);
|
|
28610
28684
|
return result;
|
|
28611
28685
|
}
|
|
@@ -46176,7 +46250,7 @@ function reorderArgs(argv) {
|
|
|
46176
46250
|
}
|
|
46177
46251
|
async function main() {
|
|
46178
46252
|
const program = new Command14();
|
|
46179
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
46253
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.57.0");
|
|
46180
46254
|
program.addCommand(createBootstrapCommand());
|
|
46181
46255
|
program.addCommand(createSynthCommand());
|
|
46182
46256
|
program.addCommand(createListCommand());
|