Skip to content
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

CloudFormation Custom Resource emulator tries to update resource after partial error #1915

Open
flostadler opened this issue Dec 16, 2024 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@flostadler
Copy link
Contributor

Right now when a Custom Resource failed to create and returned a physical resource ID the provider returns ErrorResourceInitFailed which stores the resource in state. This will cause an trigger an update on the next run.

CloudFormation doesn't do an update, it rather issues a delete and creates a new resource. We should do the same and make sure the resource is being replaced.

@flostadler flostadler added the kind/bug Some behavior is incorrect or out of spec label Dec 16, 2024
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Dec 16, 2024
@flostadler flostadler removed the needs-triage Needs attention from the triage team label Dec 16, 2024
@flostadler
Copy link
Contributor Author

flostadler commented Dec 16, 2024

Relevant for this: the provider is currently not computing the diff, it let's the engine do it:

return &pulumirpc.DiffResponse{
Changes: pulumirpc.DiffResponse_DIFF_UNKNOWN,
DeleteBeforeReplace: true,
}, nil

It might be more sensible to issue the delete call right after the failure and not save the partial state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants