Skip to content

Commit 0df45eb

Browse files
authored
Add misssing error check (#751)
1 parent 455318f commit 0df45eb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

iterative/aws/provider.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,11 @@ func ResourceMachineCreate(ctx context.Context, d *schema.ResourceData, m interf
124124
if len(securityGroup) == 0 {
125125
securityGroup = "iterative"
126126

127-
vpcsDesc, _ := svc.DescribeVpcs(ctx, &ec2.DescribeVpcsInput{})
128-
127+
vpcsDesc, err := svc.DescribeVpcs(ctx, &ec2.DescribeVpcsInput{})
128+
if err != nil {
129+
return err
130+
}
131+
129132
if len(vpcsDesc.Vpcs) == 0 {
130133
return errors.New("no VPCs found")
131134
}

0 commit comments

Comments
 (0)