mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
ec2_instance: remove network.ebs_optimized option (#55694)
Fixes #55307
This commit is contained in:
parent
43712f81e5
commit
bc9074404e
2 changed files with 2 additions and 6 deletions
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- ec2_instance - Remove deprecated ``network.ebs_optimized`` option (https://github.com/ansible/ansible/issues/55307)
|
|
@ -1126,9 +1126,6 @@ def build_top_level_options(params):
|
|||
spec.setdefault('Placement', {'GroupName': str(params.get('placement_group'))})
|
||||
if params.get('ebs_optimized') is not None:
|
||||
spec['EbsOptimized'] = params.get('ebs_optimized')
|
||||
elif (params.get('network') or {}).get('ebs_optimized') is not None:
|
||||
# Backward compatibility for workaround described in https://github.com/ansible/ansible/issues/48159
|
||||
spec['EbsOptimized'] = params['network'].get('ebs_optimized')
|
||||
if params.get('instance_initiated_shutdown_behavior'):
|
||||
spec['InstanceInitiatedShutdownBehavior'] = params.get('instance_initiated_shutdown_behavior')
|
||||
if params.get('termination_protection') is not None:
|
||||
|
@ -1625,9 +1622,6 @@ def main():
|
|||
)
|
||||
|
||||
if module.params.get('network'):
|
||||
if 'ebs_optimized' in module.params['network']:
|
||||
module.deprecate("network.ebs_optimized is deprecated."
|
||||
"Use the top level ebs_optimized parameter instead", 2.9)
|
||||
if module.params.get('network').get('interfaces'):
|
||||
if module.params.get('security_group'):
|
||||
module.fail_json(msg="Parameter network.interfaces can't be used with security_group")
|
||||
|
|
Loading…
Reference in a new issue