Class: Ufo::Cfn::Stack::Params
- Inherits:
-
Builder::Base
- Object
- Ufo::CLI::Base
- Base
- Builder::Base
- Ufo::Cfn::Stack::Params
- Defined in:
- lib/ufo/cfn/stack/params.rb
Instance Attribute Summary
Attributes inherited from Builder::Base
Attributes inherited from Ufo::CLI::Base
Instance Method Summary collapse
Methods inherited from Builder::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 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ufo/cfn/stack/params.rb', line 3 def build logger.info "Building params" params = { Vpc: vpc.id, ElbSubnets: vpc.elb_subnets, EcsSubnets: vpc.ecs_subnets, CreateElb: vars[:create_elb] ? "true" : "false", ElbTargetGroup: vars[:elb_target_group].to_s, EcsSchedulingStrategy: Ufo.config.ecs.scheduling_strategy, } params[:EcsDesiredCount] = desired_count.to_s if desired_count # Note: cfn template is type String so it can be optional params = Ufo::Utils::Squeezer.new(params).squeeze parameters = params.map do |k,v| if v == :use_previous_value { parameter_key: k, use_previous_value: true } else { parameter_key: k, parameter_value: v } end end save_params(parameters) parameters end |