providers/azurerm: more reliable testing of ID being available for

storage account
This commit is contained in:
Mitchell Hashimoto 2016-08-16 09:49:54 -07:00
parent ecad167e31
commit 31dbddbfdc
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ func resourceArmStorageAccountCreate(d *schema.ResourceData, meta interface{}) e
read, err := storageClient.GetProperties(resourceGroupName, storageAccountName) read, err := storageClient.GetProperties(resourceGroupName, storageAccountName)
// Set the ID right away if we have one // Set the ID right away if we have one
if read != nil && read.ID != nil { if err == nil && read.ID != nil {
log.Printf("[INFO] storage account %q ID: %q", storageAccountName, *read.ID) log.Printf("[INFO] storage account %q ID: %q", storageAccountName, *read.ID)
d.SetId(*read.ID) d.SetId(*read.ID)
} }