-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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(iam-group-with-policies): Related resources shouldn't be created when group creation is disabled #440
fix(iam-group-with-policies): Related resources shouldn't be created when group creation is disabled #440
Conversation
8da03fc
to
20c0a4d
Compare
This PR has been automatically marked as stale because it has been open 30 days |
…when group creation is disabled
20c0a4d
to
eca9b92
Compare
Not stale, just updated. |
This PR has been automatically marked as stale because it has been open 30 days |
Not stale. |
Hello @bryantbiggs, sorry to bother you, but could you take a quick look at this PR? It's nothing controversial, just a simple fix for something that got overlooked. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not an issue, but an expected behavior of the module.
|
||
create_group = false | ||
|
||
name = "custom-disabled" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When create_group
is set to false,
then it expects that the IAM group with the name specified in name
has already been created. Also, this module adds provided properties (such as group_users
, custom_group_policy_arns
, ...) to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@antonbabenko with due respect, but I don't see the same behaviour being followed in the other modules, iam-user
for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we had called this module iam-group,
then the scope of resources should be - all
or nothing
(like in iam-user
), but since it is iam-group-with-policies
, it expects IAM group in one way or another.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this behaviour pretty confusing @antonbabenko, but fair enough, thank you for the explanation 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it is confusing.
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
Related resources shouldn't be created when group creation is disabled
Motivation and Context
In some scenarios the
iam-group-with-policies
submodule attempts to createaws_iam_group_membership
,aws_iam_policy
andaws_iam_group_policy_attachment
resources even though thecreate_group
variable is set tofalse
. Workarounds do exist, but ultimately this behaviour is undesired.Breaking Changes
None.
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request