lib/terraforming/template/tf/route53_zone.erb in terraforming-0.1.6 vs lib/terraforming/template/tf/route53_zone.erb in terraforming-0.2.0
- old
+ new
@@ -1,7 +1,12 @@
<% hosted_zones.each do |hosted_zone| -%>
resource "aws_route53_zone" "<%= module_name_of(hosted_zone) %>" {
- name = "<%= name_of(hosted_zone) %>"
+ name = "<%= name_of(hosted_zone) %>"
+<%- if private_hosted_zone?(hosted_zone) -%>
+ <%- vpc = vpc_of(hosted_zone) -%>
+ vpc_id = "<%= vpc.vpc_id %>"
+ vpc_region = "<%= vpc.vpc_region %>"
+<%- end -%>
tags {
<% tags_of(hosted_zone).each do |tag| -%>
"<%= tag.key %>" = "<%= tag.value %>"
<% end -%>