lib/terraforming/resource/security_group.rb in terraforming-0.13.1 vs lib/terraforming/resource/security_group.rb in terraforming-0.13.2
- old
+ new
@@ -90,15 +90,20 @@
attributes = {
"#{type}.#{hashcode}.from_port" => (permission.from_port || 0).to_s,
"#{type}.#{hashcode}.to_port" => (permission.to_port || 0).to_s,
"#{type}.#{hashcode}.protocol" => permission.ip_protocol,
"#{type}.#{hashcode}.cidr_blocks.#" => permission.ip_ranges.length.to_s,
+ "#{type}.#{hashcode}.prefix_list_ids.#" => permission.prefix_list_ids.length.to_s,
"#{type}.#{hashcode}.security_groups.#" => security_groups.length.to_s,
"#{type}.#{hashcode}.self" => self_referenced_permission?(security_group, permission).to_s,
}
permission.ip_ranges.each_with_index do |range, index|
attributes["#{type}.#{hashcode}.cidr_blocks.#{index}"] = range.cidr_ip
+ end
+
+ permission.prefix_list_ids.each_with_index do |prefix_list, index|
+ attributes["#{type}.#{hashcode}.prefix_list_ids.#{index}"] = prefix_list.prefix_list_id
end
security_groups.each do |group|
attributes["#{type}.#{hashcode}.security_groups.#{group_hashcode_of(group)}"] = group
end