Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Merge 1f8dc90 into e7638c4
Browse files Browse the repository at this point in the history
  • Loading branch information
ltsampros committed Feb 24, 2017
2 parents e7638c4 + 1f8dc90 commit 41836e1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bootstrap_cfn/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,10 +1084,18 @@ def _get_ssl_certificate(self, template, certificate_name):
raise errors.CfnConfigError("Certificate name {} is invalid.".format(certificate_name))

acm_certificate = self._get_acm_certificate(certificate_name)

if acm_certificate:
logging.info("config::_get_ssl_certificate: Found ACM certificate.")
template.add_resource(acm_certificate)
return Ref(acm_certificate)
#
# Try and reuse a certificate if it already exists in the tempalte
#
existing = template.resources.get(certificate_name)
if not existing:
template.add_resource(acm_certificate)
return Ref(acm_certificate)
else:
return Ref(existing)

ssl_certificate = self._get_manual_ssl_certificate(certificate_name)
if ssl_certificate:
Expand Down

0 comments on commit 41836e1

Please sign in to comment.