-
Notifications
You must be signed in to change notification settings - Fork 80
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
Fetch aws partition #788
Merged
Merged
Fetch aws partition #788
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Does the PR have any schema changes?Looking good! No breaking changes found. |
1 similar comment
Does the PR have any schema changes?Looking good! No breaking changes found. |
Initial code to dynamically fetch the partition and interpolate that in place of the hardcoded IAM arns. This will allow gov cloud, china, and other regions that use different partitions to provision EKS clusters without having to use a transformation workaround which can be hard to implement in some languages like Golang Related to #570,#534,#386
I wrote the function to return the string `aws` if the result of grabbing the partition is false. I believe the only dependency to running the parition function is having aws:region set in the config yaml of the call. Could be worthwhile to check, but considering the current operation of the module its safe to assume that `aws` won't change anything for those using the module today.
Signed-off-by: Anthony Butt <cheeks>
- Load once at the beginning of createCore then re-use. - Allow service role managedPolicyArns to be inputs (to match the underlying resource). - Use pulumi.interpolate to safely interpolate outputs within a string.
- Identifier needs to be "plain" (not an input) as it's being used in the resource name and we don't want to wrap the resource creation in an apply so we can retain accurate previews. - Use the original aws-specific ARN for the identifier to maintain backward compatibility and not change resource names.
- Remove left-over doc comment. - Refactor getRoleProvider to use output interpolation. - Add to changelog.
danielrbradley
force-pushed
the
fetch-aws-partition
branch
from
October 7, 2022 10:03
da3e52c
to
aa9d933
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
roothorp
approved these changes
Oct 7, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome, looks like a straightforward win!
flostadler
pushed a commit
that referenced
this pull request
Sep 4, 2024
* feat: Dyamically fetch aws partition Initial code to dynamically fetch the partition and interpolate that in place of the hardcoded IAM arns. This will allow gov cloud, china, and other regions that use different partitions to provision EKS clusters without having to use a transformation workaround which can be hard to implement in some languages like Golang Related to #570,#534,#386 * fix: Fetch partition once add explict provider I wrote the function to return the string `aws` if the result of grabbing the partition is false. I believe the only dependency to running the parition function is having aws:region set in the config yaml of the call. Could be worthwhile to check, but considering the current operation of the module its safe to assume that `aws` won't change anything for those using the module today. * fix: Linting errors Signed-off-by: Anthony Butt <cheeks> * Use outputs for partitions - Load once at the beginning of createCore then re-use. - Allow service role managedPolicyArns to be inputs (to match the underlying resource). - Use pulumi.interpolate to safely interpolate outputs within a string. * Separate policy identifier from actual ARN - Identifier needs to be "plain" (not an input) as it's being used in the resource name and we don't want to wrap the resource creation in an apply so we can retain accurate previews. - Use the original aws-specific ARN for the identifier to maintain backward compatibility and not change resource names. * Dynamically set partition for RoleProvider - Remove left-over doc comment. - Refactor getRoleProvider to use output interpolation. - Add to changelog. Signed-off-by: Anthony Butt <cheeks> Co-authored-by: Anthony Butt <cheeks>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed changes
Builds on top of #785 by @tonybutt to allow EKS to be used with non-default partitions.
Rebased and refactored to use outputs and interpolation.
Related issues (optional)
Related to #570 #534 #386