Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

GCP apply step fails first time due to race condition #67

Open
rubenarakelyan opened this issue Nov 26, 2018 · 0 comments
Open

GCP apply step fails first time due to race condition #67

rubenarakelyan opened this issue Nov 26, 2018 · 0 comments

Comments

@rubenarakelyan
Copy link

Applying Terraform configuration to Google Cloud Platform always fails the first time but succeeds the second time if DNS records are being changed (rather than added or deleted).

The underlying cause is a race condition since changing a record actually just deletes the old one and creates a new one. The delete stage takes longer than the create stage, so when Terraform attempts to create the new record, the old one still exists and an error is returned by GCP. This is because Terraform seems to run steps in parallel.

This may have been fixed in a later Google provider update, but to know for sure, we need to upgrade our Terraform and provider versions to the latest available.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant