Skip to content

Instantly share code, notes, and snippets.

@djsly
Created June 9, 2017 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djsly/11300a541a92432002a843509b1fb1ed to your computer and use it in GitHub Desktop.
Save djsly/11300a541a92432002a843509b1fb1ed to your computer and use it in GitHub Desktop.
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
azurerm_resource_group.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-7f47533b4dd6/resourceGroups/slytest)
azurerm_virtual_network.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...rosoft.Network/virtualNetworks/slyvnet)
azurerm_storage_account.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Storage/storageAccounts/slysa0)
azurerm_subnet.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...ualNetworks/slyvnet/subnets/slyvnetsub)
azurerm_network_interface.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...osoft.Network/networkInterfaces/slyni0)
azurerm_storage_container.test: Refreshing state... (ID: vhds)
azurerm_virtual_machine.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0)
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed. Cyan entries are data sources to be read.
Note: You didn't specify an "-out" parameter to save this plan, so when
"apply" is called, Terraform can't guarantee this is what will execute.
-/+ azurerm_virtual_machine.test
availability_set_id: "" => "<computed>"
delete_data_disks_on_termination: "false" => "false"
delete_os_disk_on_termination: "true" => "true"
license_type: "" => "<computed>"
location: "eastus2" => "eastus2"
name: "slyvm0" => "slyvm0"
network_interface_ids.#: "1" => "1"
network_interface_ids.3620471505: "/subscriptions/f0dc697c-673c-4fb0-8852-7f47533b4dd6/resourceGroups/slytest/providers/Microsoft.Network/networkInterfaces/slyni0" => "/subscriptions/f0dc697c-673c-4fb0-8852-7f47533b4dd6/resourceGroups/slytest/providers/Microsoft.Network/networkInterfaces/slyni0"
os_profile.#: "1" => "1"
os_profile.2123949718.admin_password: "" => ""
os_profile.2123949718.admin_username: "testadmin" => ""
os_profile.2123949718.computer_name: "hostname0" => "" (forces new resource)
os_profile.466918696.admin_password: "" => "Password1234!"
os_profile.466918696.admin_username: "" => "testadmin"
os_profile.466918696.computer_name: "" => "hostnamee0" (forces new resource)
os_profile.466918696.custom_data: "" => "<computed>"
os_profile_linux_config.#: "1" => "1"
os_profile_linux_config.2972667452.disable_password_authentication: "false" => "false"
os_profile_linux_config.2972667452.ssh_keys.#: "0" => "0"
resource_group_name: "slytest" => "slytest"
storage_image_reference.#: "1" => "1"
storage_image_reference.1807630748.offer: "UbuntuServer" => "UbuntuServer"
storage_image_reference.1807630748.publisher: "Canonical" => "Canonical"
storage_image_reference.1807630748.sku: "14.04.2-LTS" => "14.04.2-LTS"
storage_image_reference.1807630748.version: "latest" => "latest"
storage_os_disk.#: "1" => "1"
storage_os_disk.107618065.caching: "ReadWrite" => "ReadWrite"
storage_os_disk.107618065.create_option: "FromImage" => "FromImage"
storage_os_disk.107618065.disk_size_gb: "0" => ""
storage_os_disk.107618065.image_uri: "" => ""
storage_os_disk.107618065.managed_disk_id: "" => "<computed>"
storage_os_disk.107618065.managed_disk_type: "" => "<computed>"
storage_os_disk.107618065.name: "myosdisk1" => "myosdisk1"
storage_os_disk.107618065.os_type: "" => ""
storage_os_disk.107618065.vhd_uri: "https://slysa0.blob.core.windows.net/vhds/myosdisk1.vhd" => "https://slysa0.blob.core.windows.net/vhds/myosdisk1.vhd"
tags.%: "0" => "<computed>"
vm_size: "Standard_A0" => "Standard_A0"
Plan: 1 to add, 0 to change, 1 to destroy.
cp: cannot stat '/root/env_config/terraform/remote/*.tfstate': No such file or directory
Terraforming (apply) on azure for product custom with prefix: master
azurerm_resource_group.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-7f47533b4dd6/resourceGroups/slytest)
azurerm_storage_account.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Storage/storageAccounts/slysa0)
azurerm_virtual_network.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...rosoft.Network/virtualNetworks/slyvnet)
azurerm_subnet.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...ualNetworks/slyvnet/subnets/slyvnetsub)
azurerm_network_interface.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...osoft.Network/networkInterfaces/slyni0)
azurerm_storage_container.test: Refreshing state... (ID: vhds)
azurerm_virtual_machine.test: Refreshing state... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0)
azurerm_virtual_machine.test: Destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 10s elapsed)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 20s elapsed)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 30s elapsed)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 40s elapsed)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 50s elapsed)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 1m0s elapsed)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 1m10s elapsed)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 1m20s elapsed)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 1m30s elapsed)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 1m40s elapsed)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 1m50s elapsed)
azurerm_virtual_machine.test: Still destroying... (ID: /subscriptions/f0dc697c-673c-4fb0-8852-...crosoft.Compute/virtualMachines/slyvm0, 2m0s elapsed)
Error applying plan:
1 error(s) occurred:
* azurerm_virtual_machine.test (destroy): 1 error(s) occurred:
* azurerm_virtual_machine.test: Error deleting OS Disk VHD: Error finding resource group for storage account slysa0: Wrong number of results making resource request for query name eq 'slysa0' and resourceType eq 'Microsoft.Storage/storageAccounts': 0
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