lib/terraforming/resource/iam_user.rb in terraforming-0.2.0 vs lib/terraforming/resource/iam_user.rb in terraforming-0.3.0
- old
+ new
@@ -26,11 +26,11 @@
"id" => user.user_name,
"name" => user.user_name,
"path" => user.path,
"unique_id" => user.user_id,
}
- resources["aws_iam_user.#{user.user_name}"] = {
+ resources["aws_iam_user.#{module_name_of(user)}"] = {
"type" => "aws_iam_user",
"primary" => {
"id" => user.user_name,
"attributes" => attributes
}
@@ -42,9 +42,13 @@
private
def iam_users
@client.list_users.users
+ end
+
+ def module_name_of(user)
+ normalize_module_name(user.user_name)
end
end
end
end