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.
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(servicecatalogappregistry): add sharing of applications and attribute groups #20850
feat(servicecatalogappregistry): add sharing of applications and attribute groups #20850
Changes from 14 commits
ec8709a
4e5fcf4
b2ad0eb
17438c5
ea7b52d
a986534
c785e58
9300e03
14c7f81
3120c49
73d0041
ecb00ec
904f751
b63da2e
8f951ee
1d62528
c4358c5
db7e438
e3e4599
5ce92cd
6a32574
bebfc13
6d0fcb2
2c8034c
80b7b5c
a422beb
34bbfdb
0570d3c
19a87dc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
The CFN docs don't specify a limit to this name's length, so it's probably fine to ignore the limit parameter on this.
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.
Also it only needs to be unique in the scope of
this
.But, it will not be unique if
shareResource()
is called more than once. Is that a supported operation? If not, I'd prefer an explicit check and error--otherwise there will be a bug report saying «if I callshareResource()
twice I get a "construct already exists" error», and we would not have gotten that bug report if the error message was "you can only callshareResource()
once"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.
I gathered more information on this and dove into the AppReg console experience for sharing. AppReg applications and attribute groups can have more than one "Share" per the console. I committed a new resource hashing strategy which aims to allow this behavior. I'm curious if there's a more optimal strategy than what I've committed.
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.
We could consider since we have hash for resource name we can either throw an error if someone tries to add same share twice or ignore it, like we do in other SC resources.
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.
I will think about this one a bit more. I think some logic to ignore it may be sufficient.
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.
not sure if this should be
true
be default...pinging @rix0rrr for adviceThere 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.
Depends on what this flag does.
Also, the docstring says "Explicitly" but proceeds to turn on the flag implicitly, which makes that word pretty redundant.
I'd suggest rewriting the docstring to be clear and specific and actionable.
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 default behavior, all it means is that you can share with accounts not in your AWS Org. Since this is really AWS Org specific (this flag is meaningless if the caller account itself is not in an aws org) maybe we can rename it align with that.
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.
I revised the docstring to be more clear on this. +1 to @arcrank on this. The default behavior is explained further in step 8 of RAM's resource sharing getting started guide: https://docs.aws.amazon.com/ram/latest/userguide/getting-started-sharing.html
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.
I would further explain the behavior in these docs to address @rix0rrr's second point; is there a method that must be called to actually share this resource? This docstring should tell the user not only that this sharing can happen, but how it happens.
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.
If the behavior relates to the organization, why don't we call it
allowPrincipalsOutsideOrganization
?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.
Thanks for the discussion on this. After conferring with the team, this property has been removed from
ShareOptions
as it is always set tofalse
in AppRegistry's sharing experience with RAM and not surfaced to the customer.