Skip to content

Commit

Permalink
Updating to SDK v10
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed May 20, 2017
1 parent 38cec70 commit 0192459
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions builtin/providers/azurerm/resource_arm_documentdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ func resourceArmDocumentDBCreateUpdate(d *schema.ResourceData, meta interface{})
Tags: expandTags(tags),
}

_, err = client.CreateOrUpdate(resGroup, name, parameters, make(chan struct{}))
_, error := client.CreateOrUpdate(resGroup, name, parameters, make(chan struct{}))
err = <-error
if err != nil {
return err
}
Expand Down Expand Up @@ -237,12 +238,18 @@ func resourceArmDocumentDBDelete(d *schema.ResourceData, meta interface{}) error
resGroup := id.ResourceGroup
name := id.Path["databaseAccounts"]

resp, err := client.Delete(resGroup, name, make(chan struct{}))
deleteResp, error := client.Delete(resGroup, name, make(chan struct{}))
resp := <-deleteResp
err = <-error

if resp.StatusCode != http.StatusOK {
return fmt.Errorf("Error issuing AzureRM delete request for DocumentDB instance '%s': %s", name, err)
}

if err != nil {
return err
}

return nil
}

Expand Down
4 changes: 2 additions & 2 deletions builtin/providers/azurerm/resource_arm_documentdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ resource "azurerm_resource_group" "test" {
location = "West US"
}
resource "azurerm_documentdb" "test" {
name = "acctestDDB-%d"
name = "acctest-%d"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
offer_type = "Standard"
Expand All @@ -172,7 +172,7 @@ resource "azurerm_resource_group" "test" {
location = "West US"
}
resource "azurerm_documentdb" "test" {
name = "acctestDDB-%d"
name = "acctest-%d"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
offer_type = "Standard"
Expand Down

0 comments on commit 0192459

Please sign in to comment.