-
Notifications
You must be signed in to change notification settings - Fork 57
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
Phsyical ID as argument to delete? #53
Comments
Is it |
In general the response to the create request will contain a PhysicalResourceId, either set by you or generated by the helper. CloudFormation passes the same PhysicalResourceId in the delete request. If your custom resource has to clean up something that that was created during handling of the create request, then it's your responsibility to set the PhysicalResourceId such that it unambiguously identifies what needs to be cleaned up. The best documentation I've found is CloudFormation's own documentation of the request and response formats. There you'll see the PhysicalResourceId documented. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requesttypes.html |
Ok thanks, that clarifies it. I think that link should be put in the docs somewhere. I'll write a PR for that. |
Hi, My problem is when AD connector creation fails. I detect it in the poll_create function but I have to raise an error to indicate there was a problem. Doing so I'm not able to return the AD connector id .... The PhysicalResourceId is generated and when my delete function is fired it is not able to delete the AD connector. Am I missing something? Best regards, |
Hi @blueskycorner , you can set the I left an example on another issue when I discovered it: #7 (comment) Does it help you? I haven't tried to use polling yet, so it's just a guess that it works the same way. If you need more help I'd suggest you open a new issue with more details so that the repo maintainers may help. |
@iainelder Thank you so much for your quick reply. It works perfectly. |
I'm trying to create a custom resource for a physical resource which has a non-deterministic ID/ARN.
i.e. when I receive the delete call, I cannot figure out which resource to delete based on the properties of the resource. I instead need to get whatever value was returned by
create
.I'm hoping this value is somewhere inside the
event
. If so, can you please document where in the event it is?The text was updated successfully, but these errors were encountered: