Skip to content

Commit

Permalink
Bug Fix - azurerm_iot_dps fix deletion issue with service principal #…
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfrahry authored Jul 30, 2019
1 parent 8603945 commit b8d319a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azurerm/resource_arm_iot_dps.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func resourceArmIotDPSDelete(d *schema.ResourceData, meta interface{}) error {
resourceGroup := id.ResourceGroup
name := id.Path["provisioningServices"]

future, err := client.Delete(ctx, resourceGroup, name)
future, err := client.Delete(ctx, name, resourceGroup)
if err != nil {
if !response.WasNotFound(future.Response()) {
return fmt.Errorf("Error deleting IoT Device Provisioning Service %q (Resource Group %q): %+v", name, resourceGroup, err)
Expand Down Expand Up @@ -214,7 +214,7 @@ func waitForIotDPSToBeDeleted(ctx context.Context, client iothub.IotDpsResourceC

func iotdpsStateStatusCodeRefreshFunc(ctx context.Context, client iothub.IotDpsResourceClient, resourceGroup, name string) resource.StateRefreshFunc {
return func() (interface{}, string, error) {
res, err := client.Get(ctx, resourceGroup, name)
res, err := client.Get(ctx, name, resourceGroup)

log.Printf("Retrieving IoT Device Provisioning Service %q (Resource Group %q) returned Status %d", resourceGroup, name, res.StatusCode)

Expand Down

0 comments on commit b8d319a

Please sign in to comment.