Skip to content

Commit

Permalink
fixup! update metal ip rs/ds to check metro from facility if metro is…
Browse files Browse the repository at this point in the history
… null
  • Loading branch information
Oscar Cobles committed Nov 17, 2022
1 parent 6c7a2dd commit ae47310
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion equinix/data_source_metal_ip_block_ranges.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@ func dataSourceMetalIPBlockRangesRead(d *schema.ResourceData, meta interface{})
} else {
targetSlice = &theIPv6s
}
if targetSlice != nil && facilityMatch(facility, ip.Facility) && metroMatch(metro, ip.Metro) && metroOffacilityMatch(metro, ip.Facility) {
if targetSlice != nil {
if !(facilityMatch(facility, ip.Facility) && metroMatch(metro, ip.Metro)) {
if !metroOffacilityMatch(metro, ip.Facility) {
continue
}
}
*targetSlice = append(*targetSlice, cnStr)
}
}
Expand Down

0 comments on commit ae47310

Please sign in to comment.