-
-
Notifications
You must be signed in to change notification settings - Fork 693
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
fix: Replace aws_iam_policy_attachment to aws_iam_role_policy_attachment #195
fix: Replace aws_iam_policy_attachment to aws_iam_role_policy_attachment #195
Conversation
1ef9124
to
96b1ddf
Compare
Well, sometimes I reply fast :) When I see new PRs I am trying to figure out if the request is even valid, more specifically:
I need to think a bit but probably I will approve this PR next week. |
@antonbabenko Sounds great! I appreciate it! |
Even though this PR will require recreation of some resources it is still having the same value for the users (the same policies will be attached), so I think it is fine to treat this as a minor release. v2.17.0 has been just released. Thanks @wsim-plaid ! Hopefully, your engineers will have no issues with Lambda and Terraform from now on :) |
…_attachment (terraform-aws-modules#195)" This reverts commit 7c53da1.
Thank you so much for quick review (again) Anton!! |
From my understanding, this is more of a warning to explain the implications of using that resource, than a recommendation to not use it. |
Good point, I also think that the "warning" in the Terraform official documentation should be more like a "notice". I personally prefer to have exclusive controls over functions and manage all IAM relations for Lambdas using this module but sometimes users want to reuse created IAM policies in their other infrastructure components and thus break the exclusivity of an attachment. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
This PR replaces
aws_iam_policy_attachment
toaws_iam_role_policy_attachment
Motivation and Context
Terraform official documentation recommends not to use
aws_iam_policy_attachment
but to useaws_iam_role_policy_attachment
,aws_iam_user_policy_attachment
, oraws_iam_group_policy_attachment
(reference: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment)How Has This Been Tested?
examples/*
projects