Class: Ufo::Cfn::Stack::Builder::Resources::ListenerSsl
- Inherits:
-
Listener
- Object
- Ufo::CLI::Base
- Base
- Base
- Base
- Listener
- Ufo::Cfn::Stack::Builder::Resources::ListenerSsl
- Defined in:
- lib/ufo/cfn/stack/builder/resources/listener_ssl.rb
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Ufo::CLI::Base
Instance Method Summary collapse
- #build ⇒ Object
-
#certificates ⇒ Object
nil on purpose.
-
#default_actions ⇒ Object
Do not use redirect settings.
- #normalize(*certs) ⇒ Object
- #port ⇒ Object
- #properties ⇒ Object
- #protocol ⇒ Object
Methods inherited from Listener
#default_action, #redirect_action
Methods inherited from Base
build, #initialize, #managed_security_group, #managed_security_groups?, #security_groups
Methods included from Ufo::Concerns
Methods included from Ufo::Concerns::Names
Methods included from AwsServices
#acm, #applicationautoscaling, #aws_options, #cloudformation, #cloudwatchlogs, #ec2, #ecr, #ecs, #elb, #find_stack, #ssm_client, #stack_resources, #status, #task_definition_arns, #waf_client
Methods inherited from Ufo::CLI::Base
Methods included from Utils::Sure
Methods included from Utils::Pretty
#pretty_home, #pretty_path, #pretty_time
Methods included from Utils::Logging
Constructor Details
This class inherits a constructor from Ufo::Cfn::Stack::Builder::Base
Instance Method Details
#build ⇒ Object
3 4 5 6 |
# File 'lib/ufo/cfn/stack/builder/resources/listener_ssl.rb', line 3 def build return unless vars[:create_listener_ssl] super end |
#certificates ⇒ Object
nil on purpose
28 29 30 31 |
# File 'lib/ufo/cfn/stack/builder/resources/listener_ssl.rb', line 28 def certificates ssl = Ufo.config.elb.ssl normalize(ssl.certificates) if ssl.certificates end |
#default_actions ⇒ Object
Do not use redirect settings. Only use by normal http listener
23 24 25 |
# File 'lib/ufo/cfn/stack/builder/resources/listener_ssl.rb', line 23 def default_actions [default_action] end |
#normalize(*certs) ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ufo/cfn/stack/builder/resources/listener_ssl.rb', line 33 def normalize(*certs) certs = certs.flatten.compact certs.map do |cert| if cert.is_a?(String) {CertificateArn: cert} else # Assume correct Hash structure cert end end end |
#port ⇒ Object
18 19 20 |
# File 'lib/ufo/cfn/stack/builder/resources/listener_ssl.rb', line 18 def port Ufo.config.elb.ssl.port end |
#properties ⇒ Object
8 9 10 11 12 |
# File 'lib/ufo/cfn/stack/builder/resources/listener_ssl.rb', line 8 def properties props = super props[:Certificates] = certificates props end |
#protocol ⇒ Object
14 15 16 |
# File 'lib/ufo/cfn/stack/builder/resources/listener_ssl.rb', line 14 def protocol vars[:default_listener_ssl_protocol] end |