From b40e5d90b6583a84b1f775420a972343ad85d352 Mon Sep 17 00:00:00 2001 From: DanHam Date: Tue, 19 Nov 2019 20:18:53 +0000 Subject: [PATCH] builder/amazon/common/step_pre_validate: Return DescribeVpcs errors --- builder/amazon/common/step_pre_validate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/amazon/common/step_pre_validate.go b/builder/amazon/common/step_pre_validate.go index e11f122cc..7a61335aa 100644 --- a/builder/amazon/common/step_pre_validate.go +++ b/builder/amazon/common/step_pre_validate.go @@ -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 {