terraform-aws-github-oidc
terraform-aws-github-oidc copied to clipboard
fix: Move policy attachment to the role.
This PR avoids the reapplication (in second terraform apply) of policy to the roles as depicted in screen shot below by attaching policies directly to the role. In the absence of this change, the terraform apply(2nd time) shows that there is still some change in state.
Is there any problem in specifying the list of policies as part of role creation?
This change is breaking the option to attach policies to the role. The role is also an output of the module.
Another option would be (breaking) to drop the va.role_policiy_arns. And let users do the attachement outside the module. Which I think is a cleaner approach.
What do you think?
I am not sure how its breaking the option to attach policies! We are using the var role_policy_arns to attach passed policies directly to the role.
stale