Fix ec2_instance module where if placement_group and tenancy are (#63340)
both set in params, the placement_group setting is ignored.
This commit is contained in:
parent
d2562cde1c
commit
7b7f15cb3a
1 changed files with 4 additions and 1 deletions
|
@ -1220,7 +1220,10 @@ def build_top_level_options(params):
|
||||||
if params.get('tenancy') is not None:
|
if params.get('tenancy') is not None:
|
||||||
spec['Placement'] = {'Tenancy': params.get('tenancy')}
|
spec['Placement'] = {'Tenancy': params.get('tenancy')}
|
||||||
if params.get('placement_group'):
|
if params.get('placement_group'):
|
||||||
spec.setdefault('Placement', {'GroupName': str(params.get('placement_group'))})
|
if 'Placement' in spec:
|
||||||
|
spec['Placement']['GroupName'] = str(params.get('placement_group'))
|
||||||
|
else:
|
||||||
|
spec.setdefault('Placement', {'GroupName': str(params.get('placement_group'))})
|
||||||
if params.get('ebs_optimized') is not None:
|
if params.get('ebs_optimized') is not None:
|
||||||
spec['EbsOptimized'] = params.get('ebs_optimized')
|
spec['EbsOptimized'] = params.get('ebs_optimized')
|
||||||
if params.get('instance_initiated_shutdown_behavior'):
|
if params.get('instance_initiated_shutdown_behavior'):
|
||||||
|
|
Loading…
Reference in a new issue