You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't create application load balancer (alb) with fargate by aws-cdk, because default target type value of alb target group is instance.
To use fargate, I needs setting network mode to awsvpc, and setting target type to ip in target group. However, the aws-cdk implementation sets instance type as default, and no way to replace it after instancing alb target group.
To be accurate, I can change the target group type by adding any targets, however fargate is not neccesary to add ip targets manually, and I don't want to do it.
instancing target group and default type is TargetType.Ip:
addLoadBalancerTarget(props) {
if (this.targetType !== undefined && this.targetType !== props.targetType) {
throw new Error(`Already have a of type '${this.targetType}', adding '${props.targetType}'; make all targets the same type.`);
}
// [[[CAN CHANGE TARGET TYPE ONLY HERE!]]]
this.targetType = props.targetType;
if (props.targetJson) {
this.targetsJson.push(props.targetJson);
}
}
Is there a way to solve this problem? (I am sorry if there is any mistake.)
The text was updated successfully, but these errors were encountered:
I couldn't create application load balancer (alb) with fargate by aws-cdk, because default target type value of alb target group is instance.
To use fargate, I needs setting network mode to
awsvpc
, and setting target type toip
in target group. However, the aws-cdk implementation setsinstance
type as default, and no way to replace it after instancing alb target group.To be accurate, I can change the target group type by adding any targets, however fargate is not neccesary to add ip targets manually, and I don't want to do it.
instancing target group and default type is TargetType.Ip:
aws-elasticloadbalancingv2/lib/shared/base-target-group.js:
Is there a way to solve this problem? (I am sorry if there is any mistake.)
The text was updated successfully, but these errors were encountered: