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: Allow setting custom trust policy in iam-assumable-role #176

Conversation

simonweil
Copy link
Contributor

Description

This change adds an option to set a custom trust policy.

Motivation and Context

I need to create an assumable role that can be assumed from all member accounts of the organization except for sandbox accounts.
This can be achieved via conditions and a deny policy for the sandbox.
As there is no possibility to cover all options of the JSON policy, the best would be for such rare situations to allow a custom trust policy.

Breaking Changes

How Has This Been Tested?

  • I have tested and validated these changes using one or more of the provided examples/* projects

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.

Suggested some improvements

modules/iam-assumable-role/main.tf Outdated Show resolved Hide resolved
@simonweil
Copy link
Contributor Author

Please check again

@simonweil
Copy link
Contributor Author

Testing it with all my setups and role combinations all work fine with no changes detected in plan so I hope we are good :)

@simonweil
Copy link
Contributor Author

Pushed a fix for the failing check, should be all green now.
Tell me if there is anything else to fix

Once you approve, I'll squash fixup commits

@github-actions
Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Jan 19, 2022
@simonweil simonweil force-pushed the feature/allow-setting-custom-trust-policy-for-an-assumable-role branch from 864b81d to 171a69d Compare January 19, 2022 18:54
@simonweil simonweil force-pushed the feature/allow-setting-custom-trust-policy-for-an-assumable-role branch from 171a69d to 5394f8f Compare January 19, 2022 18:55
@simonweil simonweil changed the title Allow setting custom trust policy feat: Allow setting custom trust policy Jan 19, 2022
@simonweil
Copy link
Contributor Author

Hi @antonbabenko
I have rebased and squashed.

Is there anything left that needs to be done to merge?

@simonweil simonweil closed this Jan 19, 2022
@simonweil simonweil reopened this Jan 19, 2022
@antonbabenko antonbabenko changed the title feat: Allow setting custom trust policy feat: Allow setting custom trust policy in iam-assumable-role Jan 19, 2022
@antonbabenko antonbabenko merged commit 095cb29 into terraform-aws-modules:master Jan 19, 2022
antonbabenko pushed a commit that referenced this pull request Jan 19, 2022
## [4.10.0](v4.9.0...v4.10.0) (2022-01-19)

### Features

* Allow setting custom trust policy in iam-assumable-role ([#176](#176)) ([095cb29](095cb29))
@antonbabenko
Copy link
Member

This PR is included in version 4.10.0 🎉

@simonweil
Copy link
Contributor Author

Thank you @antonbabenko!

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

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 Nov 9, 2022
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.

2 participants