Skip to content

Commit

Permalink
[WIP] elb_classic_lb: fix return value _format_listener method to inc…
Browse files Browse the repository at this point in the history
…lude SSLCertificateId (ansible-collections#860)

[WIP] elb_classic_lb: fix return value _format_listener method to include SSLCertificateId

SUMMARY

Fixes ansible-collections#686.
Current return value of _format_listener method does not include SSLCertificateId even if it is provided in the playbook, causing the failure as reported in above mentioned issue.
Sample return value:
{'InstancePort': 8080, 'InstanceProtocol': 'HTTP', 'LoadBalancerPort': 443, 'Protocol': 'HTTPS'}

This can be fixed by modifying the return value of _format_listener method to formatted_listener, which includes SSLCertificateId if provided in the playbook.
Sample return Value:
{'InstancePort': 8080, 'InstanceProtocol': 'HTTP', 'LoadBalancerPort': 443, 
'Protocol': 'HTTPS', 'SSLCertificateId': 'arn:aws:acm:us-east-1:1234...'}


ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

elb_classic_lb

Reviewed-by: Mark Chappell <None>
  • Loading branch information
mandar242 committed Jun 3, 2022
1 parent 6dd4c31 commit b43b1bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
@@ -0,0 +1,2 @@
bugfixes:
- elb_classic_lb - modify the return value of _format_listeners method to resolve a failure creating https listeners (https://github.com/ansible-collections/amazon.aws/pull/860).
2 changes: 1 addition & 1 deletion plugins/modules/elb_classic_lb.py
Expand Up @@ -890,7 +890,7 @@ def _format_listener(self, listener, inject_protocol=False):
if ssl_id:
formatted_listener['SSLCertificateId'] = ssl_id

return snake_dict_to_camel_dict(listener, True)
return formatted_listener

def _format_healthcheck_target(self):
"""Compose target string from healthcheck parameters"""
Expand Down

0 comments on commit b43b1bd

Please sign in to comment.