Subject: | VPN Gateway availabilityZone problem in VpnGateway.pm |
Date: | Wed, 01 May 2013 18:58:44 -0700 |
To: | bug-VM-EC2 [...] rt.cpan.org |
From: | Peter Scott <Peter [...] PSDT.com> |
There's a problem when there is no availability zone specified and this
routine is supposed to return information for all of them. $zone gets
set to undef and that results in the error
[InvalidParameterValue] Invalid availability zone: [] from API call
'DescribeAvailabilityZones' at
/usr/local/lib/perl5/site_perl/5.16.3/VM/EC2/VPC/VpnGateway.pm line 91.
The argument shouldn't be passed in that case. One possible fix:
sub availabilityZone {
my $self = shift;
my $zone = $self->SUPER::availabilityZone;
return $self->aws->describe_availability_zones($zone ? $zone : ());
}