Skip to content

Instantly share code, notes, and snippets.

@bpoland
Created March 29, 2018 17:14
Show Gist options
  • Save bpoland/961eb57a108b9a6b271d202df8d85911 to your computer and use it in GitHub Desktop.
Save bpoland/961eb57a108b9a6b271d202df8d85911 to your computer and use it in GitHub Desktop.
$ terraform apply
azurerm_storage_account.test: Refreshing state... (ID: /subscriptions/...torage/storageAccounts/account-sanitized)
azurerm_storage_blob.test_source: Refreshing state... (ID: az-test-source-version-2.vhd)
azurerm_virtual_machine_scale_set.test_vmss: Refreshing state... (ID: /subscriptions/...virtualMachineScaleSets/az-test)
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
-/+ destroy and then create replacement
<= read (data resources)
Terraform will perform the following actions:
-/+ azurerm_storage_blob.test_source (new resource required)
id: "az-test-source-version-2.vhd" => <computed> (forces new resource)
attempts: "1" => "1"
name: "az-test-source-version-2.vhd" => "az-test-source-version-2.vhd"
parallelism: "8" => "8"
resource_group_name: "resource-group-sanitized" => "resource-group-sanitized"
size: "0" => "0"
source_uri: "https://source-account-sanitized.blob.core.windows.net/test/test-source-version-2.vhd?sas-token-sanitized" => "https://source-account-sanitized.blob.core.windows.net/test/test-source-version-2.vhd?sas-token-sanitized" (forces new resource)
storage_account_name: "account-sanitized" => "account-sanitized"
storage_container_name: "vhds" => "vhds"
url: "https://account-sanitized.blob.core.windows.net/vhds/az-test-source-version-2.vhd" => <computed>
~ azurerm_virtual_machine_scale_set.test_vmss
storage_profile_os_disk.2192347964.create_option: "FromImage" => ""
storage_profile_os_disk.2192347964.image: "https://account-sanitized.blob.core.windows.net/vhds/az-test-source-version-1.vhd" => ""
storage_profile_os_disk.2192347964.name: "az-test-osp" => ""
storage_profile_os_disk.2192347964.os_type: "Linux" => ""
storage_profile_os_disk.2192347964.vhd_containers.#: "0" => "0"
storage_profile_os_disk.~2192347964.caching: "" => "ReadWrite"
storage_profile_os_disk.~2192347964.create_option: "" => "FromImage"
storage_profile_os_disk.~2192347964.image: "" => "${azurerm_storage_blob.test_source.url}"
storage_profile_os_disk.~2192347964.managed_disk_type: "" => <computed>
storage_profile_os_disk.~2192347964.name: "" => "az-test-osp"
storage_profile_os_disk.~2192347964.os_type: "" => "Linux"
storage_profile_os_disk.~2192347964.vhd_containers.#: "0" => "0"
Plan: 1 to add, 2 to change, 1 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
azurerm_storage_blob.test_source: Destroying... (ID: az-test-source-version-2.vhd)
azurerm_storage_blob.test_source: Destruction complete after 0s
azurerm_storage_blob.test_source: Creating...
attempts: "" => "1"
name: "" => "az-test-source-version-2.vhd"
parallelism: "" => "8"
resource_group_name: "" => "resource-group-sanitized"
size: "" => "0"
source_uri: "" => "https://source-account-sanitized.blob.core.windows.net/test/test-source-version-2.vhd?sas-token-sanitized"
storage_account_name: "" => "account-sanitized"
storage_container_name: "" => "vhds"
url: "" => "<computed>"
azurerm_storage_blob.test_source: Still creating... (10s elapsed)
azurerm_storage_blob.test_source: Still creating... (20s elapsed)
azurerm_storage_blob.test_source: Still creating... (30s elapsed)
azurerm_storage_blob.test_source: Still creating... (40s elapsed)
azurerm_storage_blob.test_source: Still creating... (50s elapsed)
azurerm_storage_blob.test_source: Still creating... (1m0s elapsed)
azurerm_storage_blob.test_source: Still creating... (1m10s elapsed)
azurerm_storage_blob.test_source: Still creating... (1m20s elapsed)
azurerm_storage_blob.test_source: Still creating... (1m30s elapsed)
azurerm_storage_blob.test_source: Still creating... (1m40s elapsed)
azurerm_storage_blob.test_source: Still creating... (1m50s elapsed)
azurerm_storage_blob.test_source: Still creating... (2m0s elapsed)
azurerm_storage_blob.test_source: Still creating... (2m10s elapsed)
azurerm_storage_blob.test_source: Still creating... (2m20s elapsed)
azurerm_storage_blob.test_source: Still creating... (2m30s elapsed)
azurerm_storage_blob.test_source: Still creating... (2m40s elapsed)
azurerm_storage_blob.test_source: Still creating... (2m50s elapsed)
azurerm_storage_blob.test_source: Still creating... (3m0s elapsed)
azurerm_storage_blob.test_source: Still creating... (3m10s elapsed)
azurerm_storage_blob.test_source: Still creating... (3m20s elapsed)
azurerm_storage_blob.test_source: Creation complete after 3m21s (ID: az-test-source-version-2.vhd)
Error: Error applying plan:
1 error(s) occurred:
* azurerm_virtual_machine_scale_set.test_vmss: azurerm_virtual_machine_scale_set.test_vmss: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue.
Please include the following information in your report:
Terraform Version: 0.11.5
Resource ID: azurerm_virtual_machine_scale_set.test_vmss
Mismatch reason: attribute mismatch: storage_profile_os_disk.2192347964.vhd_containers.#
Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"storage_profile_os_disk.2192347964.os_type":*terraform.ResourceAttrDiff{Old:"Linux", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "storage_profile_os_disk.~2192347964.caching":*terraform.ResourceAttrDiff{Old:"", New:"ReadWrite", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "storage_profile_os_disk.2192347964.create_option":*terraform.ResourceAttrDiff{Old:"FromImage", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "storage_profile_os_disk.2192347964.vhd_containers.#":*terraform.ResourceAttrDiff{Old:"0", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "storage_profile_os_disk.~2192347964.image":*terraform.ResourceAttrDiff{Old:"", New:"${azurerm_storage_blob.test_source.url}", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "storage_profile_os_disk.2192347964.image":*terraform.ResourceAttrDiff{Old:"https://account-sanitized.blob.core.windows.net/vhds/az-test-source-version-1.vhd", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "storage_profile_os_disk.~2192347964.create_option":*terraform.ResourceAttrDiff{Old:"", New:"FromImage", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "storage_profile_os_disk.~2192347964.managed_disk_type":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "storage_profile_os_disk.~2192347964.os_type":*terraform.ResourceAttrDiff{Old:"", New:"Linux", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "storage_profile_os_disk.~2192347964.name":*terraform.ResourceAttrDiff{Old:"", New:"az-test-osp", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "storage_profile_os_disk.2192347964.name":*terraform.ResourceAttrDiff{Old:"az-test-osp", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "storage_profile_os_disk.~2192347964.vhd_containers.#":*terraform.ResourceAttrDiff{Old:"0", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}
Diff Two (usually from apply): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff(nil), Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}
Also include as much context as you can about your config, state, and the steps you performed to trigger this error.
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment