You will get Invalid type of load balancer or target group (only ALB and NLB are supported).
This is happening that internally code is too much shared with ALB and it tries to get type from name of constructor function/class, which in case of imported NLB will not contain Network in name.
Expected behavior
It should work with imported NLB/ALB
Actual behavior
Throwing error Invalid type of load balancer or target group (only ALB and NLB are supported).
Other details
In each function you ask for specific type of ALB/NLB via separate properties networkLoadBalancer and applicationLoadBalancer - so you can keep this information internally
Version
"7.2.2"
Steps and/or minimal code example to reproduce
monitoring.monitorFargateNetworkLoadBalancer({ networkLoadBalancer: NetworkLoadBalancer.fromNetworkLoadBalancerAttributes(...) })
You will get
Invalid type of load balancer or target group (only ALB and NLB are supported).
This is happening that internally code is too much shared with ALB and it tries to get type from name of constructor function/class, which in case of imported NLB will not contain Network in name.
Expected behavior
It should work with imported NLB/ALB
Actual behavior
Throwing error
Invalid type of load balancer or target group (only ALB and NLB are supported).
Other details
In each function you ask for specific type of ALB/NLB via separate properties
networkLoadBalancer
andapplicationLoadBalancer
- so you can keep this information internally