Skip to content

Commit

Permalink
Refinements to fix for hashicorp#11626
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhijeet Gaiha committed May 12, 2017
1 parent 094825d commit 8487c04
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"log"
"net/http"

"strings"

"github.com/Azure/azure-sdk-for-go/arm/compute"
Expand Down Expand Up @@ -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,
},

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)))

Expand Down

0 comments on commit 8487c04

Please sign in to comment.