Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix - azurerm_iot_dps fix deletion issue with service principal #3973

Merged
merged 1 commit into from
Jul 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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