builder/amazon/common/step_pre_validate: Return DescribeVpcs errors

This commit is contained in:
DanHam 2019-11-19 20:18:53 +00:00
parent c5df4ed2a3
commit b40e5d90b6
No known key found for this signature in database
GPG Key ID: 58E79AEDD6AA987E
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ func (s *StepPreValidate) checkVpc(conn ec2iface.EC2API) error {
res, err := conn.DescribeVpcs(&ec2.DescribeVpcsInput{VpcIds: []*string{aws.String(s.VpcId)}})
if isAWSErr(err, "InvalidVpcID.NotFound", "") || err != nil {
return fmt.Errorf("Error retrieving VPC information for vpc_id %q", s.VpcId)
return fmt.Errorf("Error retrieving VPC information for vpc_id %s: %s", s.VpcId, err)
}
if res != nil && len(res.Vpcs) == 1 && res.Vpcs[0] != nil {