Skip to content

Commit

Permalink
Merge pull request #259 from echuvyrov/managedimagestatefix
Browse files Browse the repository at this point in the history
[MS] Added default caching value as expected by API - fixing #224
  • Loading branch information
tombuildsstuff authored Aug 21, 2017
2 parents 1dbc1e7 + 9e668cd commit 9cdb2a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions azurerm/resource_arm_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func resourceArmImage() *schema.Resource {
"caching": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Default: string(compute.None),
ValidateFunc: validation.StringInSlice([]string{
string(compute.None),
string(compute.ReadOnly),
Expand Down Expand Up @@ -127,7 +127,7 @@ func resourceArmImage() *schema.Resource {
"caching": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Default: string(compute.None),
ValidateFunc: validation.StringInSlice([]string{
string(compute.None),
string(compute.ReadOnly),
Expand Down Expand Up @@ -301,7 +301,7 @@ func flattenAzureRmStorageProfileOsDisk(d *schema.ResourceData, storageProfile *
result["managed_disk_id"] = *osDisk.ManagedDisk.ID
}
result["blob_uri"] = *osDisk.BlobURI
result["caching"] = osDisk.Caching
result["caching"] = string(osDisk.Caching)
if osDisk.DiskSizeGB != nil {
result["size_gb"] = *osDisk.DiskSizeGB
}
Expand Down

0 comments on commit 9cdb2a1

Please sign in to comment.