Fix AWS NLB reconciliation

This commit is contained in:
Ciprian Hacman 2020-11-08 13:13:06 +02:00
parent af5cd1a5fc
commit 6c6a9daaf3
2 changed files with 2 additions and 1 deletions

View File

@ -803,7 +803,7 @@ func (e *AutoscalingGroup) getTGsToDetach(currentTGs []*TargetGroup) []*string {
for _, v := range currentTGs {
if _, ok := desiredTGs[*v.ARN]; !ok {
tgsToDetach = append(tgsToDetach, v.Name)
tgsToDetach = append(tgsToDetach, v.ARN)
}
}
return tgsToDetach

View File

@ -92,6 +92,7 @@ func (e *TargetGroup) Find(c *fi.Context) (*TargetGroup, error) {
UnhealthyThreshold: tg.UnhealthyThresholdCount,
VPC: &VPC{ID: tg.VpcId},
}
e.ARN = tg.TargetGroupArn
tagsResp, err := cloud.ELBV2().DescribeTags(&elbv2.DescribeTagsInput{
ResourceArns: []*string{tg.TargetGroupArn},