Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output role_arn is incompatible with aws_iam_role_policy_attachment resource #36

Closed
AlexanderStout opened this issue Jul 28, 2023 · 0 comments

Comments

@AlexanderStout
Copy link
Contributor

AlexanderStout commented Jul 28, 2023

Issue

aws_iam_role_policy_attachment requires role name, not arn.
in order to attach a policy to the created role "github", either arn string manipulation is needed or hard-coding "github"

Example

`
module "oidc_github" {
source = "unfunco/oidc-github/aws"
version = "1.5.2"

github_repositories = ["org/repo"]
}

resource "aws_iam_role_policy_attachment" "github_role_ecr_policy_attachement" {
role = "github"
policy_arn = aws_iam_policy.ecr_push_policy.arn
}`

Proposed solution:

add role_name output which will consist only of role name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant