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

provider/google: Unset the id for resource_google_project if the create operation fails #13644

Merged
merged 2 commits into from
Apr 13, 2017

Conversation

danawillow
Copy link
Contributor

The current way means that the project creation can fail during the async part (for example, for a quota failure) but terraform thinks it succeeded.

@paddycarver
Copy link
Contributor

Don't we typically detect the error and do d.SetId("") instead? That way if the failure is a false negative (e.g., the project was actually created) we don't lose it.

@danawillow danawillow changed the title provider/google: Set the id for resource_google_project after the operation succeeds provider/google: Unset the id for resource_google_project if the create operation fails Apr 13, 2017
@danawillow
Copy link
Contributor Author

Yes (for future reference for anyone looking at this, the reason is because terraform runs in parallel, so some other resource might trigger a crash. If that happens, there's a good chance that this resource was in fact created successfully, so we set the id as early as we can, and then unset it if it does fail)

@paddycarver
Copy link
Contributor

LGTM, thanks @danawillow! Merge at will.

@danawillow danawillow merged commit ae5332b into master Apr 13, 2017
@danawillow danawillow deleted the danawillow-google-project branch April 13, 2017 23:16
@ghost
Copy link

ghost commented Apr 14, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants