ec2_instance - fix instance creation with IPv6 (#40334)

IPv6 addresses and IPv6 address count may not be specified on the same request https://docs.aws.amazon.com/cli/latest/reference/ec2/assign-ipv6-addresses.html#options
This commit is contained in:
saydamir 2018-05-24 17:10:23 +03:00 committed by Ryan S. Brown
parent d829ff6993
commit 8666c08327

View file

@ -869,7 +869,6 @@ def build_network_spec(params, ec2=None):
if interface_params.get('ipv6_addresses'):
spec['Ipv6Addresses'] = [{'Ipv6Address': a} for a in interface_params.get('ipv6_addresses', [])]
spec['Ipv6AddressCount'] = len(spec['Ipv6Addresses'])
if interface_params.get('private_ip_address'):
spec['PrivateIpAddress'] = interface_params.get('private_ip_address')