lib/terraforming/template/tf/elb.erb in terraforming-0.0.5 vs lib/terraforming/template/tf/elb.erb in terraforming-0.1.0

- old
+ new

@@ -1,10 +1,13 @@ <% load_balancers.each do |load_balancer| -%> <%- load_balancer_attributes = load_balancer_attributes_of(load_balancer) -%> resource "aws_elb" "<%= module_name_of(load_balancer) %>" { name = "<%= load_balancer.load_balancer_name %>" - availability_zones = <%= load_balancer.availability_zones.inspect %> + <%- if vpc_elb?(load_balancer) -%> subnets = <%= load_balancer.subnets.inspect %> + <%- else -%> + availability_zones = <%= load_balancer.availability_zones.inspect %> + <%- end -%> security_groups = <%= load_balancer.security_groups.inspect %> instances = <%= load_balancer.instances.map { |instance| instance.instance_id }.inspect %> cross_zone_load_balancing = <%= load_balancer_attributes.cross_zone_load_balancing.enabled %> idle_timeout = <%= load_balancer_attributes.connection_settings.idle_timeout %> connection_draining = <%= load_balancer_attributes.connection_draining.enabled %>