-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
API errors lead to state file being wiped #40
Comments
I have this issue, importing them back works as a workaround but it would be better in the provider could only remove them if it got an actual response from the API. |
This was referenced Jun 3, 2020
jianyuan
pushed a commit
that referenced
this issue
Jun 3, 2020
This new helper properly and uniformly handles Sentry API 404 errors with respect to the Terraform SDK. Prior to this commit, in most places an API error was always interpretted as a missing resource. Now, a 404 is considered a missing resource and other API errors are surfaced as real errors. This will ensure that, for example, a user with a malformed API token (bad permissions, etc) doesn't wipe out Terraform state. Fixes the following Github issues: - #40 - #57
Fixed in #70. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On the
master
version of this provider (Terraform 0.12), I encountered behavior where some unknown event let to all Sentry resources disappearing from my tfstate file.The going theory is that a problem with the Refresh/GET operation occurred on the Sentry side which instead of causing a failure caused this provider to return empty objects, leading to a success status and an empty payload.
I've seen similar behavior before when a Sentry API key is provided that doesn't have sufficient access to GET the resources from the API. Instead of erring out it succeeds and declares the resource to be non-existent, when in fact it does exist and the Provider doesn't have access to see it.
The text was updated successfully, but these errors were encountered: