feat: Extended trusted_entities
variable to support multiple types
#143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change allows a better customization for the
trusted entities
used in the assume role policyFor example :
Motivation and Context
Currently,
trusted_entities
input variable only accepts a list of strings which is added to the typeService
of the assume role Principal.For example:
Will be interpreted as :
In the issue #138 I explain that we need a
AWS
Principal in our assume role (the goal is to execute lambda in local using its assume role).Breaking Changes
This first version overwrites
trusted_entities
input variable. It was previously a list of (service only) strings, and now becomes a list of objects consisting of atype
string (likeService
orAWS
) and anidentifiers
array of strings (like an array of services URL as before or a list of ARNs), which will break previous usages of this variable as a list of strings.But It could also be moved to another input variable so it doesn’t break the current
trusted_entities
input variable. The only thing that is missing is a good variable name which reflects the openness of the input variable compared to the currenttrusted_entities
, which actually seems to be atrusted_services_entities
.How Has This Been Tested?
examples/*
projectsThank you for your help and your fantastic work on this module 👏