don't error if service account key is already gone on delete (#1659)

Fixes #1657
This commit is contained in:
Dana Hoffman 2018-06-14 14:49:24 -07:00 committed by GitHub
parent f4e4d880c5
commit d884312f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,7 +156,7 @@ func resourceGoogleServiceAccountKeyDelete(d *schema.ResourceData, meta interfac
_, err := config.clientIAM.Projects.ServiceAccounts.Keys.Delete(d.Id()).Do()
if err != nil {
return err
return handleNotFoundError(err, d, fmt.Sprintf("Service Account Key %q", d.Id()))
}
d.SetId("")