Skip to content

Commit

Permalink
correct path to azurerm_iothub.endpoints.type attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksymilian Boguń committed Mar 8, 2019
1 parent d64aba8 commit c750319
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion azurerm/resource_arm_iothub.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import (

func suppressIfTypeIsNot(t string) schema.SchemaDiffSuppressFunc {
return func(k, old, new string, d *schema.ResourceData) bool {
return d.Get("type").(string) != t
path := strings.Split(k, ".")
path[len(path)-1] = "type"
return d.Get(strings.Join(path, ".")).(string) != t
}
}

Expand Down

0 comments on commit c750319

Please sign in to comment.