Subject: | associate_address doesn't support VPC |
Date: | Thu, 20 Dec 2012 14:28:34 -0500 |
To: | bug-Net-Amazon-EC2 [...] rt.cpan.org |
From: | Vincent Rivellino <vince79 [...] gmail.com> |
associate_address() doesn't support specifying an allocation-id when
associating an EIP with an instance that is within a VPC.
Quick & dirty fix:
[vrivellino@opssvc1 ~]$ cat perl-Net-Amazon-EC2-associate_address.diff
--- /usr/local/share/perl5/Net/Amazon/EC2.pm 2012-10-26 17:01:37.000000000
+0000
+++ perl5/lib/perl5/Net/Amazon/EC2.pm 2012-12-20 18:55:19.197181626 +0000
@@ -377,7 +377,8 @@
my $self = shift;
my %args = validate( @_, {
InstanceId => { type => SCALAR },
- PublicIp => { type => SCALAR },
+ PublicIp => { type => SCALAR, optional => 1 },
+ AllocationId => { type => SCALAR, optional => 1 },
});
my $xml = $self->_sign(Action => 'AssociateAddress', %args);