lib/terraforming/resource/route53_zone.rb in terraforming-0.6.1 vs lib/terraforming/resource/route53_zone.rb in terraforming-0.6.2
- old
+ new
@@ -23,10 +23,11 @@
hosted_zones.inject({}) do |resources, hosted_zone|
zone_id = zone_id_of(hosted_zone)
vpc = vpc_of(hosted_zone)
attributes = {
+ "comment"=> comment_of(hosted_zone),
"id"=> zone_id,
"name"=> name_of(hosted_zone),
"name_servers.#" => name_servers_of(hosted_zone).length.to_s,
"tags.#" => tags_of(hosted_zone).length.to_s,
"vpc_id" => vpc ? vpc.vpc_id : "",
@@ -51,9 +52,13 @@
@client.list_hosted_zones.hosted_zones.map { |hosted_zone| @client.get_hosted_zone(id: hosted_zone.id) }
end
def tags_of(hosted_zone)
@client.list_tags_for_resource(resource_type: "hostedzone", resource_id: zone_id_of(hosted_zone)).resource_tag_set.tags
+ end
+
+ def comment_of(hosted_zone)
+ hosted_zone.hosted_zone.config.comment
end
def name_of(hosted_zone)
hosted_zone.hosted_zone.name.gsub(/\.\z/, "")
end