Created
May 4, 2016 14:59
-
-
Save vmorris/6ff907bab20c61a4a9a0de093d82c8dd to your computer and use it in GitHub Desktop.
terraform plan, apply, destroy - instance volume not removed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(openstack) volume list | |
+--------------------------------------+--------------+-----------+------+-----------------------------------------------+ | |
| ID | Display Name | Status | Size | Attached to | | |
+--------------------------------------+--------------+-----------+------+-----------------------------------------------+ | |
| 718e3e3e-f577-4f69-8530-f423b65e5bb3 | None | in-use | 10 | Attached to vem-terraform-ubuntu on /dev/vda | | |
| 4fcc3064-2129-4042-9880-dde32ca5ef3a | None | in-use | 10 | Attached to vem-terraform-sles on /dev/vda | | |
+--------------------------------------+--------------+-----------+------+-----------------------------------------------+ | |
vance@zs95k5:~/terraform/ubu-sle$ terraform plan | |
Refreshing Terraform state prior to plan... | |
openstack_compute_keypair_v2.keypair_1: Refreshing state... (ID: tf-keypair-1) | |
openstack_networking_network_v2.network_1: Refreshing state... (ID: efaef038-cf87-4384-b2cb-baf4209c29cd) | |
openstack_networking_router_v2.router_1: Refreshing state... (ID: caf1b442-14fc-48b4-9903-ba0e2c92bf14) | |
openstack_compute_secgroup_v2.secgroup_1: Refreshing state... (ID: d357b6e3-63b0-4c34-a3e8-74f70812a59c) | |
openstack_networking_subnet_v2.subnet_1: Refreshing state... (ID: 13289459-8246-4450-9cac-993b9175d4ce) | |
openstack_networking_router_interface_v2.router_interface_1: Refreshing state... (ID: fba67cc5-7734-4fa9-8b9a-2104f67d889e) | |
openstack_compute_floatingip_v2.floating_ip_ubuntu: Refreshing state... (ID: 1d70a4e5-626f-4851-8ef9-f82ddc168ebc) | |
openstack_compute_floatingip_v2.floating_ip_sles: Refreshing state... (ID: 7ea7e1a0-4212-4a97-8c21-310367e594a7) | |
openstack_compute_instance_v2.instance_ubuntu: Refreshing state... (ID: 0228ce98-b502-4eef-842e-652821de85d9) | |
openstack_compute_instance_v2.instance_sles: Refreshing state... (ID: c133c58c-2d27-4bf4-b684-bbc3b736d449) | |
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. | |
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. | |
~ openstack_compute_instance_v2.instance_sles | |
block_device.0.delete_on_termination: "0" => "1" | |
~ openstack_compute_instance_v2.instance_ubuntu | |
block_device.0.delete_on_termination: "0" => "1" | |
Plan: 0 to add, 2 to change, 0 to destroy. | |
vance@zs95k5:~/terraform/ubu-sle$ terraform apply | |
openstack_compute_keypair_v2.keypair_1: Refreshing state... (ID: tf-keypair-1) | |
openstack_networking_network_v2.network_1: Refreshing state... (ID: efaef038-cf87-4384-b2cb-baf4209c29cd) | |
openstack_compute_secgroup_v2.secgroup_1: Refreshing state... (ID: d357b6e3-63b0-4c34-a3e8-74f70812a59c) | |
openstack_networking_router_v2.router_1: Refreshing state... (ID: caf1b442-14fc-48b4-9903-ba0e2c92bf14) | |
openstack_networking_subnet_v2.subnet_1: Refreshing state... (ID: 13289459-8246-4450-9cac-993b9175d4ce) | |
openstack_networking_router_interface_v2.router_interface_1: Refreshing state... (ID: fba67cc5-7734-4fa9-8b9a-2104f67d889e) | |
openstack_compute_floatingip_v2.floating_ip_ubuntu: Refreshing state... (ID: 1d70a4e5-626f-4851-8ef9-f82ddc168ebc) | |
openstack_compute_floatingip_v2.floating_ip_sles: Refreshing state... (ID: 7ea7e1a0-4212-4a97-8c21-310367e594a7) | |
openstack_compute_instance_v2.instance_sles: Refreshing state... (ID: c133c58c-2d27-4bf4-b684-bbc3b736d449) | |
openstack_compute_instance_v2.instance_ubuntu: Refreshing state... (ID: 0228ce98-b502-4eef-842e-652821de85d9) | |
openstack_compute_instance_v2.instance_ubuntu: Modifying... | |
block_device.0.delete_on_termination: "0" => "1" | |
openstack_compute_instance_v2.instance_sles: Modifying... | |
block_device.0.delete_on_termination: "0" => "1" | |
openstack_compute_instance_v2.instance_sles: Modifications complete | |
openstack_compute_instance_v2.instance_ubuntu: Modifications complete | |
Apply complete! Resources: 0 added, 2 changed, 0 destroyed. | |
The state of your infrastructure has been saved to the path | |
below. This state is required to modify and destroy your | |
infrastructure, so keep it safe. To inspect the complete state | |
use the `terraform show` command. | |
State path: terraform.tfstate | |
Outputs: | |
SLES address = 10.20.102.151 | |
Ubuntu address = 10.20.102.156 | |
vance@zs95k5:~/terraform/ubu-sle$ terraform destroy | |
Do you really want to destroy? | |
Terraform will delete all your managed infrastructure. | |
There is no undo. Only 'yes' will be accepted to confirm. | |
Enter a value: yes | |
openstack_networking_network_v2.network_1: Refreshing state... (ID: efaef038-cf87-4384-b2cb-baf4209c29cd) | |
openstack_compute_keypair_v2.keypair_1: Refreshing state... (ID: tf-keypair-1) | |
openstack_compute_secgroup_v2.secgroup_1: Refreshing state... (ID: d357b6e3-63b0-4c34-a3e8-74f70812a59c) | |
openstack_networking_router_v2.router_1: Refreshing state... (ID: caf1b442-14fc-48b4-9903-ba0e2c92bf14) | |
openstack_networking_subnet_v2.subnet_1: Refreshing state... (ID: 13289459-8246-4450-9cac-993b9175d4ce) | |
openstack_networking_router_interface_v2.router_interface_1: Refreshing state... (ID: fba67cc5-7734-4fa9-8b9a-2104f67d889e) | |
openstack_compute_floatingip_v2.floating_ip_ubuntu: Refreshing state... (ID: 1d70a4e5-626f-4851-8ef9-f82ddc168ebc) | |
openstack_compute_floatingip_v2.floating_ip_sles: Refreshing state... (ID: 7ea7e1a0-4212-4a97-8c21-310367e594a7) | |
openstack_compute_instance_v2.instance_sles: Refreshing state... (ID: c133c58c-2d27-4bf4-b684-bbc3b736d449) | |
openstack_compute_instance_v2.instance_ubuntu: Refreshing state... (ID: 0228ce98-b502-4eef-842e-652821de85d9) | |
openstack_compute_instance_v2.instance_sles: Destroying... | |
openstack_compute_instance_v2.instance_ubuntu: Destroying... | |
openstack_compute_instance_v2.instance_sles: Still destroying... (10s elapsed) | |
openstack_compute_instance_v2.instance_ubuntu: Still destroying... (10s elapsed) | |
openstack_compute_instance_v2.instance_ubuntu: Destruction complete | |
openstack_compute_instance_v2.instance_sles: Destruction complete | |
openstack_compute_floatingip_v2.floating_ip_ubuntu: Destroying... | |
openstack_compute_keypair_v2.keypair_1: Destroying... | |
openstack_compute_secgroup_v2.secgroup_1: Destroying... | |
openstack_compute_floatingip_v2.floating_ip_sles: Destroying... | |
openstack_compute_floatingip_v2.floating_ip_sles: Destruction complete | |
openstack_compute_keypair_v2.keypair_1: Destruction complete | |
openstack_compute_floatingip_v2.floating_ip_ubuntu: Destruction complete | |
openstack_networking_router_interface_v2.router_interface_1: Destroying... | |
openstack_compute_secgroup_v2.secgroup_1: Still destroying... (10s elapsed) | |
openstack_networking_router_interface_v2.router_interface_1: Still destroying... (10s elapsed) | |
openstack_networking_router_interface_v2.router_interface_1: Destruction complete | |
openstack_networking_subnet_v2.subnet_1: Destroying... | |
openstack_networking_router_v2.router_1: Destroying... | |
openstack_compute_secgroup_v2.secgroup_1: Destruction complete | |
openstack_networking_subnet_v2.subnet_1: Still destroying... (10s elapsed) | |
openstack_networking_router_v2.router_1: Still destroying... (10s elapsed) | |
openstack_networking_subnet_v2.subnet_1: Destruction complete | |
openstack_networking_network_v2.network_1: Destroying... | |
openstack_networking_router_v2.router_1: Destruction complete | |
openstack_networking_network_v2.network_1: Still destroying... (10s elapsed) | |
openstack_networking_network_v2.network_1: Destruction complete | |
(openstack) volume list | |
+--------------------------------------+--------------+-----------+------+-------------+ | |
| ID | Display Name | Status | Size | Attached to | | |
+--------------------------------------+--------------+-----------+------+-------------+ | |
| 718e3e3e-f577-4f69-8530-f423b65e5bb3 | None | available | 10 | | | |
| 4fcc3064-2129-4042-9880-dde32ca5ef3a | None | available | 10 | | | |
+--------------------------------------+--------------+-----------+------+-------------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment