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

Ensure resource exists before update #3768

Open
danielrbradley opened this issue Dec 10, 2024 · 0 comments
Open

Ensure resource exists before update #3768

danielrbradley opened this issue Dec 10, 2024 · 0 comments
Labels
kind/enhancement Improvements or new features

Comments

@danielrbradley
Copy link
Member

When performing a resource update, most resources use a PUT method. This PUT is the same as is used for most create methods. Therefore, if a resource has moved or been deleted and a refresh has not detected the drift, when the provider performs the PUT during an update, it will actually create a brand new resource while reporting to the user that it's only performed an update.

To avoid this ambiguity we should perform a HEAD or GET request before the PUT to ensure that the resource does indeed already exist as we expect. If the resource no longer exists then we should prompt the user to perform a refresh to rectify the drift.

@danielrbradley danielrbradley added the kind/enhancement Improvements or new features label Dec 10, 2024
@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Dec 10, 2024
@danielrbradley danielrbradley removed the needs-triage Needs attention from the triage team label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
Status: No status
Development

No branches or pull requests

2 participants