Skip to content

feat: allow adding more trusted principals to task role #155

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

Conversation

parmouraly
Copy link
Contributor

Description

Extra input variable to allow module users to optionally define extra principals that can assume the task role.
Apart from the main module code and documentation, the example is also updated to showcase how the new variable can be used.

Motivation and Context

At the moment, the only trusted entity to assume the task role is the absolute minimum ecs-tasks.amazonaws.com.
However sometimes it's convenient to allow adding more principals.
For example in order to allow easy SSM access into the Fargate task, ssm.amazonaws.com should be trusted too.

Breaking Changes

No breaking changes. Just adding an optional input variable.

How Has This Been Tested?

From my project downstream, I have referenced this PR branch and applied my infrastructure. It works as expected.

At the moment, the only trusted entity to assume the task role
is the absolute minimum ecs-tasks.amazonaws.com
However sometimes it's convenient to add more principals.
For example in order to allow easy SSM access into the Fargate
task, ssm.amazonaws.com should be trusted too.

This commit allows module users to optionally define extra principals
that can assume the task role.
@parmouraly parmouraly marked this pull request as draft September 2, 2020 09:04
@parmouraly
Copy link
Contributor Author

Hi @antonbabenko 👋
I would like to test this PR before I mark it as ready for review.
At the moment I am using this module with
source = "terraform-aws-modules/atlantis/aws"

Is it possible for me to change this source path so I can reference my branch?
I have tried unsuccessfully something like
source = "git::ssh://github.com/parmouraly/terraform-aws-atlantis.git?ref=feature/extra-trusted-entities"

Any help would be appreciated thanks!

@antonbabenko
Copy link
Member

Should work like this - source = "git::[email protected]:parmouraly/terraform-aws-atlantis.git?ref=feature/extra-trusted-entities"

@parmouraly parmouraly marked this pull request as ready for review September 7, 2020 16:08
@parmouraly
Copy link
Contributor Author

@antonbabenko are you waiting anything from me on this or can we merge please?

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.

Looks good, a minor comment before I can merge.

@antonbabenko antonbabenko merged commit 7aed8dc into terraform-aws-modules:master Dec 10, 2020
@antonbabenko
Copy link
Member

Thanks!

v2.27.0 has been just released.

@parmouraly parmouraly deleted the feature/extra-trusted-entities branch December 23, 2020 15:56
@github-actions
Copy link

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 10, 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