Skip to content

feat: Add permissions boundary for IAM role - #104

Merged
antonbabenko merged 6 commits into
terraform-aws-modules:masterfrom
edersonbrilhante:add_permissions_boundary_aws_iam_role
Jun 10, 2020
Merged

feat: Add permissions boundary for IAM role#104
antonbabenko merged 6 commits into
terraform-aws-modules:masterfrom
edersonbrilhante:add_permissions_boundary_aws_iam_role

Conversation

@edersonbrilhante

@edersonbrilhante edersonbrilhante commented Feb 10, 2020

Copy link
Copy Markdown
Contributor

Description
This PR will close issue #115. Allowing to create "aws_iam_role" "rds_enhanced_monitoring" when AWS is set to use permissions boundary in an IAM role creation.

Motivation and Context
In my case, my AWS account I am using permissions boundary to avoid creating a new role with bigger permissions. So any new role must set this boundary.
To run the resource aws_iam_role. rds_enhanced_monitoring, it is needed to set permissions boundary.

Breaking Changes
None

@edersonbrilhante

Copy link
Copy Markdown
Contributor Author

Hey team.
Can you check is this PR makes sense?
I updated with the last changes from master

@bobbydeveaux

Copy link
Copy Markdown

Awesome @edersonbrilhante - using this now!!

@zephinzer

zephinzer commented Jun 2, 2020

Copy link
Copy Markdown

Bump, having the same use case! Btw I think it would be better if the purpose of the permission_boundary was better indicated for the consumer, eg. iam_enhanced_monitoring_permission_boundary.

@edersonbrilhante

Copy link
Copy Markdown
Contributor Author

@zephinzer I think it is a good idea. I can change, but I would like more feedback before changing.

@david-wells-1

Copy link
Copy Markdown

@edersonbrilhante personally I would keep the code as is - but you could add more detail or a link in the Readme if you want to better explain the purpose of the permission boundary. The permission boundary isn't actually for enhanced_monitoring.

@zephinzer

zephinzer commented Jun 10, 2020

Copy link
Copy Markdown

@david-wells-1 it seems it's for the iam user created for the enhanced_monitoring (we're currently maintaining our own fork for this feature, would be good to have this in the main module because it seems like enterprises that are on AWS tend to impose a permissions boundary as a form of control over subaccounts)

Comment thread variables.tf
variable "permissions_boundary" {
description = "The ARN of the policy that is used to set the permissions boundary for the role."
type = string
default = null

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe the default value should be null for people who don't want to enforce any permissions_boundary. I have updated it.

@antonbabenko antonbabenko changed the title Add permissions boundary aws iam role feat: Add permissions boundary for IAM role Jun 10, 2020
@antonbabenko
antonbabenko merged commit 2363d43 into terraform-aws-modules:master Jun 10, 2020
@antonbabenko

Copy link
Copy Markdown
Member

Thanks, everyone!

v2.18.0 has been released.

@github-actions

Copy link
Copy Markdown

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 Apr 15, 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