<% iam_groups.each do |group| -%> resource "aws_iam_group_membership" "<%= group.group_name %>" { name = "<%= membership_name_of(group) %>" users = <%= group_members_of(group).inspect %> group = "<%= group.group_name %>" } <% end -%>