SparkleFormation.new(:compute_template) do parameters do elb_sg do type 'String' descriptoon 'ELB Security Group' end end dynamic!(:security_group_with_rules, :compute, :ingress => { :ssh => { :protocol => 'tcp', :ports => 22 }, :http_redirect => { :protocol => 'tcp', :ports => 8080, :source_group => ref!(:elb_sg) }, :https_oauth2_proxy => { :protocol => 'tcp', :ports => 4180, :source_group => ref!(:elb_sg) } }, :egress => { :all => { :protocol => '-1', :ports => [1, 65535] } } ) end