-
Notifications
You must be signed in to change notification settings - Fork 30
Add extra values to handler request #149
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
|
not happy with how bloated the NewRequest function has become with these additions. Would like to narrow how many variables go into the function. |
|
and i am not sure how to solve my 2 "todo" items as the relevant sections were labeled internal to RPDK and where i would go to make such edits or if i even should be doing that.
|
|
Thanks for your contribution. We will take a look shortly. |
ammokhov
left a comment
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.
good start. do you think we should add awsPartition as well?
|
FWIW, Partition is useful to help structure an AWS Arn: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Beyond that it's probably marginal value and is unlikely to have use outside of AWS types.
We can probably use the same idea I proposed here: aws-cloudformation/cloudformation-cli-python-plugin#107 |
|
@rjlohan would it make more sense if every plugin was going to make this estimation that it be centrally managed potentially within cloudformation-cli to make changes for maintainability to be easier should they change in the future and the plugins simply just read a value off the request and pass through? (no idea on that workload haven't had a big read of that repo). if everyone is happy to have the tech debt i can make the changes in this PR to include the equivalent of aws-cloudformation/cloudformation-cli-python-plugin#107 (comment) |
|
aws-cloudformation/cloudformation-cli#502 seems like this adds the extra things needed to do this in a simple way. regarding the testing side. |
I'm afraid this will be plugin by plugin, we cannot address it on the I think it would be good to just include the change done in Python plugin aws-cloudformation/cloudformation-cli-python-plugin#107 (comment) |
| request := handler.NewRequest( | ||
| event.Request.LogicalResourceIdentifier, | ||
| event.Request.NextToken, | ||
| "", //TODO: understand how to fix this to use a proper value |
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 think it should be the same as above event.StackID and event.RequestData.StackTags.
|
Close with PR #157 |
Issue #, if available: #147
Description of changes:
Added extra variables to the request used by custom resources
change is missing Partitions (not sure where / what that is) also missing a way to correctly do makeTestEventFunc
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.