Skip to content

Commit

Permalink
Revert filestore instance mutex lock (#6672) (#12753)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Oct 10, 2022
1 parent 44355f6 commit a9b9724
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
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

0 comments on commit a9b9724

Please sign in to comment.