class Stax::Generators::FargateGenerator
Attributes
stack[RW]
subnetids[RW]
vpc[RW]
vpcid[RW]
Private Class Methods
Public Instance Methods
add_templates()
click to toggle source
# File lib/generators/fargate/fargate_generator.rb, line 27 def add_templates directory '.', 'cf' end
add_to_staxfile()
click to toggle source
# File lib/generators/fargate/fargate_generator.rb, line 23 def add_to_staxfile append_to_file 'Staxfile', "stack :#{stack}, import: :#{vpc}, include: %w[Ecs Alb Logs]\n" end
ask_for_options()
click to toggle source
# File lib/generators/fargate/fargate_generator.rb, line 16 def ask_for_options @stack = options[:stack] || ask('stack to use or create?', default: 'app') @vpc = ask('vpc stack to connect?', default: 'vpc') @vpcid = ask("vpc export to import from stack #{vpc}?", default: 'VpcId') @subnetids = ask("subnet export to import from stack #{vpc}?", default: 'SubnetIds') end
check_args()
click to toggle source
# File lib/generators/fargate/fargate_generator.rb, line 12 def check_args usage! unless args.empty? end