Fix ec2_instance module where if placement_group and tenancy are (#63340)

both set in params, the placement_group setting is ignored.
pull/64133/merge
Geoffrey Blake 5 years ago committed by Jill R
parent d2562cde1c
commit 7b7f15cb3a

@ -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…
Cancel
Save