lib/vagrant-aws/util/elb.rb in vagrant-aws-0.6.0 vs lib/vagrant-aws/util/elb.rb in vagrant-aws-0.7.0
- old
+ new
@@ -18,10 +18,12 @@
env[:ui].info I18n.t("vagrant_aws.elb.deregistering", instance_id: instance_id, elb_name: elb_name), :new_line => false
elb = get_load_balancer(env[:aws_elb], elb_name)
if elb.instances.include? instance_id
elb.deregister_instances([instance_id])
env[:ui].info I18n.t("vagrant_aws.elb.ok"), :prefix => false
- adjust_availability_zones env, elb
+ if env[:machine].provider_config.unregister_elb_from_az
+ adjust_availability_zones env, elb
+ end
else
env[:ui].info I18n.t("vagrant_aws.elb.skipped"), :prefix => false
end
end