From 8487c04b8193b74684cb4ad13c536fbd09294cb4 Mon Sep 17 00:00:00 2001 From: Abhijeet Gaiha Date: Fri, 12 May 2017 15:28:43 +0530 Subject: [PATCH] Refinements to fix for #11626 --- .../azurerm/resource_arm_virtual_machine_scale_set.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set.go b/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set.go index 73b89500dbac..2b79b80bcb29 100644 --- a/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set.go +++ b/builtin/providers/azurerm/resource_arm_virtual_machine_scale_set.go @@ -5,7 +5,6 @@ import ( "fmt" "log" "net/http" - "strings" "github.com/Azure/azure-sdk-for-go/arm/compute" @@ -53,9 +52,9 @@ func resourceArmVirtualMachineScaleSet() *schema.Resource { }, "tier": { - Type: schema.TypeString, - Optional: true, - // Computed: true, + Type: schema.TypeString, + Optional: true, + Computed: true, DiffSuppressFunc: ignoreCaseDiffSuppressFunc, }, @@ -775,7 +774,7 @@ func flattenAzureRmVirtualMachineScaleSetSku(sku *compute.Sku) []interface{} { result["capacity"] = *sku.Capacity if *sku.Tier != "" { - result["tier"] = strings.ToLower(*sku.Tier) + result["tier"] = *sku.Tier } log.Printf("[DEBUG] agaiha sku values, Name:(%s), Capacity:(%d), Tier:(%s)", *sku.Name, *sku.Capacity, *sku.Tier) @@ -832,7 +831,7 @@ func resourceArmVirtualMachineScaleSetSkuHash(v interface{}) int { m := v.(map[string]interface{}) buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) if m["tier"] != nil { - buf.WriteString(fmt.Sprintf("%s-", m["tier"].(string))) + buf.WriteString(fmt.Sprintf("%s-", strings.ToLower(m["tier"].(string)))) } buf.WriteString(fmt.Sprintf("%d-", m["capacity"].(int)))