[aws] Convert containerPort to int before comparing to avoid jinja2 string-int issues (#39215) (#47195)
This commit is contained in:
parent
fce9673ac1
commit
b923bf708d
1 changed files with 6 additions and 5 deletions
|
@ -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…
Reference in a new issue