Class: Ufo::Stack::Builder::Resources::Listener
- Inherits:
-
Base
- Object
- Base
- Base
- Ufo::Stack::Builder::Resources::Listener
show all
- Defined in:
- lib/ufo/stack/builder/resources/listener.rb
Instance Method Summary
collapse
Methods inherited from Base
build, #copy_instance_variables, #initialize, #managed_security_group, #managed_security_groups?, #security_groups
#cfn, #network, #settings
Instance Method Details
#build ⇒ Object
3
4
5
6
7
8
9
|
# File 'lib/ufo/stack/builder/resources/listener.rb', line 3
def build
{
Type: "AWS::ElasticLoadBalancingV2::Listener",
Condition: "CreateElbIsTrue",
Properties: properties,
}
end
|
#port ⇒ Object
38
39
40
|
# File 'lib/ufo/stack/builder/resources/listener.rb', line 38
def port
80
end
|
#properties ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/ufo/stack/builder/resources/listener.rb', line 11
def properties
props = {
DefaultActions: [
{
Type: "forward",
TargetGroupArn: {
"Fn::If": [
"ElbTargetGroupIsBlank",
{Ref: "TargetGroup"},
{Ref: "ElbTargetGroup"}
]
}
}
],
LoadBalancerArn: {Ref: "Elb"},
Protocol: protocol,
}
props[:Port] = port if port
props
end
|
#protocol ⇒ Object
34
35
36
|
# File 'lib/ufo/stack/builder/resources/listener.rb', line 34
def protocol
@default_listener_protocol
end
|