mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-05 17:52:38 +00:00
Just remove deleted bindings not present in the API.
We can just set the ID of bindings that are scheduled to be deleted but don't exist in the API, we don't need an entire separate read request.
This commit is contained in:
parent
d3f901bfc3
commit
9c1c0bbc52
|
@ -204,7 +204,9 @@ func resourceGoogleProjectIamBindingDelete(d *schema.ResourceData, meta interfac
|
|||
break
|
||||
}
|
||||
if toRemove < 0 {
|
||||
return resourceGoogleProjectIamBindingRead(d, meta)
|
||||
log.Printf("[DEBUG]: Policy bindings for project %q did not include a binding for role %q, no need to delete", pid, binding.Role)
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
|
||||
p.Bindings = append(p.Bindings[:toRemove], p.Bindings[toRemove+1:]...)
|
||||
|
|
Loading…
Reference in New Issue
Block a user