lib/terraforming/resource/iam_role.rb in terraforming-0.12.0 vs lib/terraforming/resource/iam_role.rb in terraforming-0.13.0

- old
+ new

@@ -28,11 +28,11 @@ "id" => role.role_name, "name" => role.role_name, "path" => role.path, "unique_id" => role.role_id, } - resources["aws_iam_role.#{role.role_name}"] = { + resources["aws_iam_role.#{module_name_of(role)}"] = { "type" => "aws_iam_role", "primary" => { "id" => role.role_name, "attributes" => attributes } @@ -44,9 +44,13 @@ private def iam_roles @client.list_roles.map(&:roles).flatten + end + + def module_name_of(role) + normalize_module_name(role.role_name) end end end end