1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[aws|elb] Support HTTPS protocol on load balancers (requires IAM SSLCertificateId)

This commit is contained in:
James Miller 2011-03-01 08:22:31 +08:00 committed by Wesley Beary
parent 8a59ceed2d
commit 989b354165
2 changed files with 5 additions and 1 deletions

View file

@ -85,7 +85,7 @@ module Fog
:host => @host,
:path => @path,
:port => @port,
:version => '2009-11-25'
:version => '2010-07-01'
}
)

View file

@ -14,6 +14,7 @@ module Fog
# * 'Protocol'<~String> - Protocol to use. Either HTTP or TCP.
# * 'LoadBalancerPort'<~Integer> - The port that the ELB will listen to for outside traffic
# * 'InstancePort'<~Integer> - The port on the instance that the ELB will forward traffic to
# * 'SSLCertificateId'<~String> - ARN of the server certificate
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
@ -27,15 +28,18 @@ module Fog
listener_protocol = []
listener_lb_port = []
listener_instance_port = []
listener_ssl_certificate_id = []
listeners.each do |listener|
listener_protocol.push(listener['Protocol'])
listener_lb_port.push(listener['LoadBalancerPort'])
listener_instance_port.push(listener['InstancePort'])
listener_ssl_certificate_id.push(listener['SSLCertificateId'])
end
params.merge!(AWS.indexed_param('Listeners.member.%d.Protocol', listener_protocol))
params.merge!(AWS.indexed_param('Listeners.member.%d.LoadBalancerPort', listener_lb_port))
params.merge!(AWS.indexed_param('Listeners.member.%d.InstancePort', listener_instance_port))
params.merge!(AWS.indexed_param('Listeners.member.%d.SSLCertificateId', listener_ssl_certificate_id))
request({
'Action' => 'CreateLoadBalancer',