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

Revert filestore instance mutex lock #12753

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/6672.txt
@@ -0,0 +1,3 @@
```release-note:enhancement
filestore: removed constraint that forced multiple `google_filestore_instance` creations to occur serially
```
21 changes: 0 additions & 21 deletions google/resource_filestore_instance.go
Expand Up @@ -296,13 +296,6 @@ func resourceFilestoreInstanceCreate(d *schema.ResourceData, meta interface{}) e
obj["kmsKeyName"] = kmsKeyNameProp
}

lockName, err := replaceVars(d, config, "filestore/{{project}}")
if err != nil {
return err
}
mutexKV.Lock(lockName)
defer mutexKV.Unlock(lockName)

url, err := replaceVars(d, config, "{{FilestoreBasePath}}projects/{{project}}/locations/{{location}}/instances?instanceId={{name}}")
if err != nil {
return err
Expand Down Expand Up @@ -473,13 +466,6 @@ func resourceFilestoreInstanceUpdate(d *schema.ResourceData, meta interface{}) e
obj["fileShares"] = fileSharesProp
}

lockName, err := replaceVars(d, config, "filestore/{{project}}")
if err != nil {
return err
}
mutexKV.Lock(lockName)
defer mutexKV.Unlock(lockName)

url, err := replaceVars(d, config, "{{FilestoreBasePath}}projects/{{project}}/locations/{{location}}/instances/{{name}}")
if err != nil {
return err
Expand Down Expand Up @@ -545,13 +531,6 @@ func resourceFilestoreInstanceDelete(d *schema.ResourceData, meta interface{}) e
}
billingProject = project

lockName, err := replaceVars(d, config, "filestore/{{project}}")
if err != nil {
return err
}
mutexKV.Lock(lockName)
defer mutexKV.Unlock(lockName)

url, err := replaceVars(d, config, "{{FilestoreBasePath}}projects/{{project}}/locations/{{location}}/instances/{{name}}")
if err != nil {
return err
Expand Down