Merge pull request #12002 from hashicorp/paddy_catch_metadata_delete_error

provider/google: Check for errors when deleting project metadata.
This commit is contained in:
Paddy 2017-02-17 14:23:48 -08:00 committed by GitHub
commit 672f496344
1 changed files with 4 additions and 0 deletions

View File

@ -192,6 +192,10 @@ func resourceComputeProjectMetadataDelete(d *schema.ResourceData, meta interface
op, err := config.clientCompute.Projects.SetCommonInstanceMetadata(projectID, md).Do()
if err != nil {
return fmt.Errorf("Error removing metadata from project %s: %s", projectID, err)
}
log.Printf("[DEBUG] SetCommonMetadata: %d (%s)", op.Id, op.SelfLink)
err = computeOperationWaitGlobal(config, op, project.Name, "SetCommonMetadata")