Class: Ufo::Cfn::Stack::Builder::Resources::ListenerCertificate
- Inherits:
-
ListenerSsl
- Object
- Ufo::CLI::Base
- Base
- Base
- Base
- Listener
- ListenerSsl
- Ufo::Cfn::Stack::Builder::Resources::ListenerCertificate
- Defined in:
- lib/ufo/cfn/stack/builder/resources/listener_certificate.rb
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Ufo::CLI::Base
Instance Method Summary collapse
Methods inherited from ListenerSsl
#default_actions, #normalize, #port, #protocol
Methods inherited from Listener
#default_action, #default_actions, #port, #protocol, #redirect_action
Methods inherited from Base
build, #initialize, #manage_ecs_security_group?, #managed_security_group, #security_groups
Methods included from Ufo::Concerns
Methods included from Ufo::Concerns::Names
Methods included from AwsServices
#acm, #applicationautoscaling, #aws_options, #cfn, #cloudwatchlogs, #ec2, #ecr, #ecs, #elb, #s3, #ssm_client, #waf_client
Methods included from AwsServices::Concerns
#find_stack, #find_stack_resources, #stack_resources, #status, #task_definition_arns
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 7 8 9 10 |
# File 'lib/ufo/cfn/stack/builder/resources/listener_certificate.rb', line 3 def build return unless certificates && certificates.size >= 1 # already removed firt cert { Type: "AWS::ElasticLoadBalancingV2::ListenerCertificate", Condition: "CreateElbIsTrue", Properties: properties, } end |
#certificates ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ufo/cfn/stack/builder/resources/listener_certificate.rb', line 19 def certificates ssl = Ufo.config.elb.ssl if ssl.certificates certs = normalize(ssl.certificates) # CloudFormation has weird interface # Only one cert allowed at the AWS::ElasticLoadBalancingV2::Listener # https://stackoverflow.com/questions/54447250/how-to-set-multiple-certificates-for-awselasticloadbalancingv2listener # Also note the docs say "You can specify one certificate per resource." # But tested and multiple certs here work certs[1..-1] # dont include the first one end end |
#properties ⇒ Object
12 13 14 15 16 17 |
# File 'lib/ufo/cfn/stack/builder/resources/listener_certificate.rb', line 12 def properties { Certificates: certificates, ListenerArn: {Ref: "ListenerSsl"} } end |