<% topics.each do |topic| -%> resource "aws_sns_topic" "<%= module_name_of(topic) %>" { name = "<%= module_name_of(topic) %>" display_name = "<%= topic["DisplayName"] %>" <% if topic.key? "Policy" -%> policy = < POLICY <% end -%> <% if topic.key? "DeliveryPolicy" -%> delivery_policy = < POLICY <% end -%> } <% end -%>