Skip to content

Commit

Permalink
Merge pull request #11 from Guslington/custom-dns-to-loadbalancer
Browse files Browse the repository at this point in the history
only supply the sslcertid mapping if using a listener with protocol https
  • Loading branch information
Guslington authored Oct 10, 2018
2 parents 6cc6807 + 258a87a commit 06c7916
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions loadbalancer.cfhighlander.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@
map 'AccountId'
attribute 'DnsDomain'
end
MappingParam('SslCertId') do
map 'AccountId'
attribute 'SslCertId'

if defined?(listeners)
unless listeners.select { |listener,properties| properties['protocol'] == 'https' }.empty?
MappingParam('SslCertId') do
map 'AccountId'
attribute 'SslCertId'
end
end
end

maximum_availability_zones.times do |x|
Expand All @@ -25,4 +30,4 @@

ComponentParam 'VPCId', type: 'AWS::EC2::VPC::Id'
end
end
end

0 comments on commit 06c7916

Please sign in to comment.