Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

ec2_vpc throws strange errors if region parameter is absent #484

Open
aptituz opened this issue Nov 5, 2017 · 0 comments
Open

ec2_vpc throws strange errors if region parameter is absent #484

aptituz opened this issue Nov 5, 2017 · 0 comments

Comments

@aptituz
Copy link

aptituz commented Nov 5, 2017

When defining anec2_vpc resource and not specifying the region parameter the module throws strange error messages like "Could not set 'present' on ensure: type mismatch: String given".

The problem can be reproduced with a manifest like the following:

ec2_vpc { 'foo':
  ensure      => present,
  cidr_block => '10.0.0.0/24',
}

I had AWS_REGIONdefined in my environment and would have assumed that the module uses that instead of specifying it in each resource, but apparently it isn't as the debug output tells:

Info: Creating VPC foo in absent

Setting a region in the resource is a viable workaround, but if the region argument is required the error handling should be adjusted to actually say so.

This happened with version 2.0.0 of the module and puppet 4.10.8.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant