Merge pull request #8391 from DanHam/validate-aws-vpc-info

builder/amazon/common/step_pre_validate: Return DescribeVpcs errors
This commit is contained in:
Wilken Rivera 2019-11-19 16:28:38 -05:00 committed by GitHub
commit 68da46cdc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {