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

feat: Added direct policy attachment in iam-user module #387

Conversation

SlavaDevOps
Copy link
Contributor

Description

Add ability to assign a list of custom IAM Policies to selected IAM User during creation

Motivation and Context

Sometimes IAM Users require some elevation of privileges without including other groups. Also some projects should have a single user without a group, for example the terraform user with pre-existing policies to deploy resources. Does not make sense to create a group for this purpose, so the ability to add some policies to IAM User is a nice feature.

Breaking Changes

None

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@SlavaDevOps SlavaDevOps changed the title Add direct policy attachment feat: add direct policy attachment May 29, 2023
@SlavaDevOps SlavaDevOps changed the title feat: add direct policy attachment feat(iam-user): Add direct policy attachment May 29, 2023
@cameron-mcdougle-arturoai

This would be really helpful! Thank you. You have my vote for merging.

@joelgaria
Copy link

Please add this functionality

@SlavaDevOps
Copy link
Contributor Author

@antonbabenko issues fixed, please merge when you'll have time. Thanks!

Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost great. Minor comments.

modules/iam-user/outputs.tf Outdated Show resolved Hide resolved
modules/iam-user/main.tf Outdated Show resolved Hide resolved
modules/iam-user/outputs.tf Outdated Show resolved Hide resolved
@SlavaDevOps SlavaDevOps requested a review from antonbabenko July 19, 2023 09:38
Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's be consistent and rename custom_iam_policy_arns to policy_arns everywhere.

@SlavaDevOps
Copy link
Contributor Author

@antonbabenko Thanks, I finished it

@antonbabenko antonbabenko changed the title feat(iam-user): Add direct policy attachment feat: Added direct policy attachment in iam-user module Jul 19, 2023
@antonbabenko antonbabenko merged commit 9fa481f into terraform-aws-modules:master Jul 19, 2023
antonbabenko pushed a commit that referenced this pull request Jul 19, 2023
## [5.28.0](v5.27.0...v5.28.0) (2023-07-19)

### Features

* Added direct policy attachment in iam-user module ([#387](#387)) ([9fa481f](9fa481f))
@antonbabenko
Copy link
Member

This PR is included in version 5.28.0 🎉

@SlavaDevOps SlavaDevOps deleted the add-direct-policy-attachment branch August 6, 2023 11:43
@igor-nikiforov
Copy link

Unfortunately this not working as expected. See #408

@github-actions
Copy link

github-actions bot commented Sep 8, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants