lib/terraforming/resource/iam_group.rb in terraforming-0.12.0 vs lib/terraforming/resource/iam_group.rb in terraforming-0.13.0
- old
+ new
@@ -26,11 +26,11 @@
"id" => group.group_name,
"name" => group.group_name,
"path" => group.path,
"unique_id" => group.group_id,
}
- resources["aws_iam_group.#{group.group_name}"] = {
+ resources["aws_iam_group.#{module_name_of(group)}"] = {
"type" => "aws_iam_group",
"primary" => {
"id" => group.group_name,
"attributes" => attributes
}
@@ -42,9 +42,13 @@
private
def iam_groups
@client.list_groups.map(&:groups).flatten
+ end
+
+ def module_name_of(group)
+ normalize_module_name(group.group_name)
end
end
end
end