Skip to content

Commit

Permalink
chore: remove zone relationship
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra committed Dec 16, 2024
1 parent 7a9258d commit 16b5592
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions scrapers/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1156,12 +1156,6 @@ func (aws Scraper) instances(ctx *AWSContext, config v1.AWS, results *v1.ScrapeR
Relationship: "RegionInstance",
})

relationships = append(relationships, v1.RelationshipResult{
ConfigExternalID: v1.ExternalID{ExternalID: ctx.Subnets[lo.FromPtr(i.SubnetId)].Zone, ConfigType: v1.AWSAvailabilityZone},
RelatedExternalID: selfExternalID,
Relationship: "ZoneInstance",
})

instance := NewInstance(i)
labels := instance.Tags
if labels == nil {
Expand Down Expand Up @@ -1634,20 +1628,6 @@ func (aws Scraper) subnets(ctx *AWSContext, config v1.AWS, results *v1.ScrapeRes
Relationship: "RegionSubnet",
})

// Subnet to availability zone relationship
relationships = append(relationships, v1.RelationshipResult{
RelatedExternalID: selfExternalID,
ConfigExternalID: v1.ExternalID{ExternalID: lo.FromPtr(subnet.AvailabilityZone), ConfigType: v1.AWSAvailabilityZone},
Relationship: "AvailabilityZoneSubnet",
})

// Subnet to availability zone relationship
relationships = append(relationships, v1.RelationshipResult{
RelatedExternalID: selfExternalID,
ConfigExternalID: v1.ExternalID{ExternalID: lo.FromPtr(subnet.AvailabilityZoneId), ConfigType: v1.AWSAvailabilityZoneID},
Relationship: "AvailabilityZoneIDSubnet",
})

result := v1.ScrapeResult{
Type: v1.AWSEC2Subnet,
Status: string(subnet.State),
Expand Down

0 comments on commit 16b5592

Please sign in to comment.