Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Jul 29, 2025
1 parent cdd63b5 commit 6e0d65b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rolesanywhere/aws_config.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
resource "local_file" "aws_config_file" {
filename = format("%v/%v.%v", "./certs", local.role_name, "aws_config")
filename = format("%v/%v/%v.%v", path.root, "certs", local.role_name, "aws_config")
file_permission = "0644"
directory_permission = "0755"
content = templatefile("aws_config.tpl", {
content = templatefile("${path.module}/aws_config.tpl", {
account_alias = var.account_alias
role_name = local.role_name
role_arn = aws_iam_role.role.arn
Expand Down
4 changes: 2 additions & 2 deletions rolesanywhere/role.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ resource "aws_iam_role" "role" {
}

resource "aws_iam_role_policy_attachment" "role" {
for_each = var.create ? toset(var.attached_policies) : toset([])
role = var.create ? aws_iam_role.role[0].name : ""
for_each = toset(var.attached_policies)
role = aws_iam_role.role.name
policy_arn = each.value
}

Expand Down

0 comments on commit 6e0d65b

Please sign in to comment.