mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #30618 from rallytime/bp-30591
Back-port #30591 to 2015.8
This commit is contained in:
commit
f00d8f398a
@ -1272,6 +1272,15 @@ def _create_eni_if_necessary(interface, vm_):
|
||||
if k in interface:
|
||||
params.update(_param_from_config(k, interface[k]))
|
||||
|
||||
if 'AssociatePublicIpAddress' in interface:
|
||||
# Associating a public address in a VPC only works when the interface is not
|
||||
# created beforehand, but as a part of the machine creation request.
|
||||
for k in ('DeviceIndex', 'AssociatePublicIpAddress', 'NetworkInterfaceId'):
|
||||
if k in interface:
|
||||
params[k] = interface[k]
|
||||
params['DeleteOnTermination'] = interface.get('delete_interface_on_terminate', True)
|
||||
return params
|
||||
|
||||
params['Action'] = 'CreateNetworkInterface'
|
||||
|
||||
result = aws.query(params,
|
||||
|
Loading…
Reference in New Issue
Block a user