-
Notifications
You must be signed in to change notification settings - Fork 123
Use safer aws_iam_role_policy_attachment #63
base: master
Are you sure you want to change the base?
Conversation
merge changes
Using this resource is not a problem if you create a policy and use it strictly in one place. This module does that and it works fine. However, if you then use this module's policies outside of the module (which was never intended, as it's not an output of the module) then you'll run into the issues that the warning describes. That seems to be the case here (after chatting on Slack). The way it works now is fine and working as intended, but I agree that it would be better if it were using However, I'm not sure how this change would be applied by Terraform and AWS. These 2 potential scenarios concern me:
I wonder if we rename the roles, will it handle the transition more smoothly? In that case, it might be worth switching to the terraform-aws-lambda-role module. This is a fairly substantial change and it only helps people who are doing something that they should stop doing anyway. So I'm on the fence. |
@raymondbutcher I can understand that frustration.
data sources ¯_(ツ)_/¯ ... but I agree
It requires a specific set of steps to do safely.
I don't believe so but maybe? There only seem to be a handful of options OptionsVersion pin and cut overIt's possible no one would be affected since the module's policy may never have been reused. The module "lambda" {
source = "claranet/lambda/aws"
version = "0.12.0"
...
} A new major version Fork and archiveIf this repo won't get this change, there can be a separate public claranet fork, NothingIf nothing is decided to do, then at the very least the usage of the bad resource should be documented. |
@raymondbutcher could you please add your thoughts to the last message? |
@raymondbutcher friendly bump |
Drop
aws_iam_policy_attachment
due to the resource warningUse instead the aws_iam_role_policy_attachment