Skip to content
This repository was archived by the owner on Sep 26, 2021. It is now read-only.

Commit dccdee0

Browse files
feuGeneAshin-
authored andcommitted
aws ec2 preqreq check: match error to filter
filter to search for a subnet searches by both regionZone and VpcId, but when no matches were found, the error message neglected to mention that the VPC ID was part of the search criteria Signed-off-by: F. Eugene Aumson <[email protected]>
1 parent 6971794 commit dccdee0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/amazonec2/amazonec2.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ func (d *Driver) checkPrereqs() error {
503503
}
504504

505505
if len(subnets.Subnets) == 0 {
506-
return fmt.Errorf("unable to find a subnet in the zone: %s", regionZone)
506+
return fmt.Errorf("unable to find a subnet that is both in the zone %s and belonging to VPC ID %s", regionZone, d.VpcId)
507507
}
508508

509509
d.SubnetId = *subnets.Subnets[0].SubnetId

0 commit comments

Comments
 (0)