[aws] Convert containerPort to int before comparing to avoid jinja2 string-int issues (#39215) (#47195)

pull/47218/head
David González 6 years ago committed by Ryan Brown
parent fce9673ac1
commit b923bf708d

@ -516,7 +516,12 @@ def main():
role = module.params['role']
clientToken = module.params['client_token']
loadBalancers = module.params['load_balancers']
loadBalancers = []
for loadBalancer in module.params['load_balancers']:
if 'containerPort' in loadBalancer:
loadBalancer['containerPort'] = int(loadBalancer['containerPort'])
loadBalancers.append(loadBalancer)
if update:
if (existing['loadBalancers'] or []) != loadBalancers:
@ -529,10 +534,6 @@ def main():
deploymentConfiguration,
network_configuration)
else:
for loadBalancer in loadBalancers:
if 'containerPort' in loadBalancer:
loadBalancer['containerPort'] = int(loadBalancer['containerPort'])
# doesn't exist. create it.
try:
response = service_mgr.create_service(module.params['name'],
module.params['cluster'],

Loading…
Cancel
Save