lib/bosh-bootstrap/microbosh_providers/aws.rb in bosh-bootstrap-0.14.4 vs lib/bosh-bootstrap/microbosh_providers/aws.rb in bosh-bootstrap-0.14.5

- old
+ new

@@ -19,10 +19,15 @@ "nats"=>{"address"=>public_ip}}, "properties"=>{"aws_registry"=>{"address"=>public_ip}}}}) if az = settings.exists?("provider.az") data["resources"]["cloud_properties"]["availability_zone"] = az end + if vpc? + dns = settings.exists?("recursor") ? settings.recursor : vpc_dns(public_ip) + data["apply_spec"]["properties"]["dns"] = {} + data["apply_spec"]["properties"]["dns"]["recursor"] = dns + end data end def network_configuration if vpc? @@ -100,10 +105,10 @@ end def vpc? settings.address["subnet_id"] end - + # Note: this should work for all /16 vpcs and may run into issues with other blocks def vpc_dns(ip_address) ip_address.gsub(/^(\d+)\.(\d+)\..*/, '\1.\2.0.2') end # @return [Hash] description of each self-owned AMI