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,6 +1220,9 @@ def build_top_level_options(params):
|
|||
if params.get('tenancy') is not None:
|
||||
spec['Placement'] = {'Tenancy': params.get('tenancy')}
|
||||
if 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:
|
||||
spec['EbsOptimized'] = params.get('ebs_optimized')
|
||||
|
|
Loading…
Reference in a new issue