diff --git a/scrapers/aws/aws.go b/scrapers/aws/aws.go index 1b4ab7f4..6fc68924 100644 --- a/scrapers/aws/aws.go +++ b/scrapers/aws/aws.go @@ -1264,7 +1264,7 @@ func (aws Scraper) loadBalancers(ctx *AWSContext, config v1.AWS, results *v1.Scr Name: *lb.LoadBalancerName, Labels: labels, Tags: tags, - Aliases: []string{"AWSELB/" + arn, arn}, + Aliases: []string{"AWSELB/" + arn, arn, lo.FromPtr(lb.CanonicalHostedZoneName)}, ID: *lb.LoadBalancerName, Parents: []v1.ConfigExternalKey{{Type: v1.AWSEC2VPC, ExternalID: lo.FromPtr(lb.VPCId)}}, RelationshipResults: relationships, diff --git a/scrapers/kubernetes/kubernetes.go b/scrapers/kubernetes/kubernetes.go index e2fa2f19..23c32db8 100644 --- a/scrapers/kubernetes/kubernetes.go +++ b/scrapers/kubernetes/kubernetes.go @@ -516,6 +516,13 @@ func ExtractResults(ctx api.ScrapeContext, config v1.Kubernetes, objs []*unstruc if ingress, ok := ing.(map[string]any); ok { if hostname, ok := ingress["hostname"].(string); ok && hostname != "" { labels["hostname"] = hostname + + if strings.HasSuffix(hostname, "elb.amazonaws.com") { + relationships = append(relationships, v1.RelationshipResult{ + ConfigID: string(obj.GetUID()), + RelatedExternalID: v1.ExternalID{ExternalID: []string{hostname}, ConfigType: v1.AWSLoadBalancer}, + }) + } } if ip, ok := ingress["ip"].(string); ok && ip != "" {