Method: Ufo::Stack::Context#default_elb_options

Defined in:
lib/ufo/stack/context.rb

#default_elb_optionsObject



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/ufo/stack/context.rb', line 122

def default_elb_options
  # cannot use :use_previous_value because need to know the create_elb value to
  # compile a template with the right DependsOn for the Ecs service
  unless @new_stack
    create_elb = get_parameter_value(@stack, "CreateElb")
    elb_target_group = get_parameter_value(@stack, "ElbTargetGroup")
    return [create_elb, elb_target_group]
  end

  # default is to create the load balancer is if container name is web
  # and no --elb option is provided
  create_elb = container[:name] == "web" ? "true" : "false"
  elb_target_group = ""
  [create_elb, elb_target_group]
end