Terraform on Cloud Service K5

To date we’re seeing a few customers that have chosen terraform as their preferred open source hybrid/multi-cloud orchestration tool. Though this is a third party application and is not supported by Fujitsu or the K5 support team, as it has a provider for OpenStack, and K5 is based on OpenStack, it’s possible to use terraform to deploy resources on K5.

Caution: Please note that enhancements unique to K5 will obviously NOT be possible using terraform unless you port these enhancements to terraform yourself.

This blog demonstrates how to deploy a server on Fujitsu Cloud Service K5 using terraform. A big thanks goes out to Gavin Williams @fatmcgav, Senior Automation Engineer at ACT, for sharing the terraform scripts required to meet today’s goal. Gavin was also instrumental in getting terraform’s providers updated to support OpenStack’s Keystone V3 endpoint which is used by K5.

I’m using an Ubuntu laptop for this demonstration.

Linux grazzer-dev 4.4.0-75-generic #96-Ubuntu SMP Thu Apr 20 09:56:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

 

Terraform Installation

The first thing that you’ll need to do is grab a copy of the latest release of terraform at https://www.terraform.io/downloads.html. I used Terraform v0.9.5 for this demo – earlier versions may not have the Keystone V3 enhancements. Once you’ve installed terraform – it’s only a single binary – and configured the path e.g.

export PATH="$PATH:$HOME/some/path/to/terraform"

you’re ready to start using terraform.

Demo Setup

Create a demo directory where you would like to store the example terraform scripts. Now simply clone the repository located at https://github.com/allthingsclowd/K5_Terraform_Deployment_Example into your demo directory –

git clone https://github.com/allthingsclowd/K5_Terraform_Deployment_Example /my/demo/directory

 

Providers.tf Configuration

Configure the providers file above replacing items 1 – 4 , everything within the double quotes “”, with your specific environment variables. Fujitsu K5 uses Contract name in place of the default OpenStack Domain name – everywhere you need to enter a Domain name please use your K5 Contract name.

Region

Region -> Item 5. in the configuration file auth_url refers to the region that you are trying to authenticate against. Currently this may be any of the following uk-1, de-1, fi-1 or es-1 for the EMEIA (check online or ping me if you need the regions in ASIA or the Americas). The region is supplied with your K5 contract details.

My configured file for the uk-1 region looks like this (yours will and should be different) –

The default region is set to the uk-1 on all the example terraform files. Please ensure to do a find and replace on ‘uk-‘ with ‘de-‘ or whichever region that you need to work in.

Update: External Gateway Configuration (set per Availability Zone)

In the file K5-1A.TF, the external_gateway also needs to be configured for the to match the target external network ID of the availability zone being targeted. E.g. in the uk-1a availability zone one of the external networks IDs is df8d3f21-75f2-412a-8fd9-29de9b4a4fa8” which gives us the following setting for the router configuration: 

external_gateway = “df8d3f21-75f2-412a-8fd9-29de9b4a4fa8”

Please also set this value to match your target availability zone.

I’ve included a ssh keypair in the files folder for use in the demo. Replace these with you own if this isn’t a simple crash and burn deployment – best not to store the private key there too, security first!  😉

When all of this is complete you can now deploy your first terraform scripted server to K5 as follows – ensure you’re in the same directory as the downloaded tf files that you just configured.

First we’ll check what would get deployed during a live run by executing the ‘terraform plan’ command as follows –

grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ ls
files  k5-1a.tf  k5-security-groups.tf  providers.tf  variables.tf
grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ terraform plan
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.

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.

+ openstack_compute_instance_v2.tf_nc_test_1a_instance_1
    access_ip_v4:                         ""
    access_ip_v6:                         ""
    all_metadata.%:                       ""
    availability_zone:                    "uk-1a"
    block_device.#:                       "1"
    block_device.0.boot_index:            "0"
    block_device.0.delete_on_termination: "true"
    block_device.0.destination_type:      "volume"
    block_device.0.source_type:           "image"
    block_device.0.uuid:                  "58fd966f-b055-4cd0-9012-cf6af7a4c32b"
    block_device.0.volume_size:           "30"
    flavor_id:                            ""
    flavor_name:                          "T-1"
    force_delete:                         "false"
    image_id:                             ""
    image_name:                           ""
    key_pair:                             "tf-test-keypair-1a"
    metadata.%:                           "1"
    metadata.demo:                        "metadata"
    name:                                 "tf_nc_test_1a_instance_1"
    network.#:                            "1"
    network.0.access_network:             "false"
    network.0.fixed_ip_v4:                ""
    network.0.fixed_ip_v6:                ""
    network.0.floating_ip:                ""
    network.0.mac:                        ""
    network.0.name:                       ""
    network.0.port:                       ""
    network.0.uuid:                       "${openstack_networking_network_v2.tf_nc_test_1a.id}"
    region:                               "uk-1"
    security_groups.#:                    "1"
    security_groups.213421011:            "tf_nc_test_sec_1"
    stop_before_destroy:                  "false"

+ openstack_compute_keypair_v2.tf-test-keypair-1a
    name:                          "tf-test-keypair-1a"
    public_key:                    "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDK1XM3ZpYZuKuBsjUo0qy1VI01ROJakrx86Tk28XmQbDQrkS528yPU5MnjIz3OGk+mbRVr29oWX4iS+sYkYrqo01Z9/3Ui4STdALhfzwe/OOcevQ/45WOB/VcE991J5d9+yvvcohHUAP6XUUrpa3w9f032C98qeNzO/6IkICnkYl3JmlXoXdcNkbT+zWsVtS3yVOYOeX1jXQBzvIUYY0mEuCqJV6nK+39bwWlnzvfbE9UTGtE/gqX4f6oA7W1KG93AIIBYSUXOASe3GAnVE4D0UZ633bXpzdAyzddBPx1rKirBiNSPN7np3QOos8AiAQcjRCmlFOa53EyD/vK37tAX grazzer@grazzer-dev\n"
    region:                        "uk-1"
    value_specs.%:                 "1"
    value_specs.availability_zone: "uk-1a"

+ openstack_networking_network_v2.tf_nc_test_1a
    admin_state_up:                "true"
    name:                          "tf_nc_test_1a"
    region:                        "uk-1"
    shared:                        ""
    tenant_id:                     ""
    value_specs.%:                 "1"
    value_specs.availability_zone: "uk-1a"

+ openstack_networking_port_v2.tf_nc_test_rtr_1a_subnet_int
    admin_state_up:                "true"
    all_fixed_ips.#:               ""
    allowed_address_pairs.#:       ""
    device_id:                     ""
    device_owner:                  ""
    fixed_ip.#:                    "1"
    fixed_ip.0.ip_address:         "192.168.70.1"
    fixed_ip.0.subnet_id:          "${openstack_networking_subnet_v2.tf_nc_test_1a_subnet.id}"
    mac_address:                   ""
    name:                          "tf_nc_test_rtr_1a_subnet_int"
    network_id:                    "${openstack_networking_network_v2.tf_nc_test_1a.id}"
    region:                        "uk-1"
    security_group_ids.#:          ""
    tenant_id:                     ""
    value_specs.%:                 "1"
    value_specs.availability_zone: "uk-1a"

+ openstack_networking_router_interface_v2.tf_nc_test_rtr_1a_if_1
    port_id:   "${openstack_networking_port_v2.tf_nc_test_rtr_1a_subnet_int.id}"
    region:    "uk-1"
    router_id: "${openstack_networking_router_v2.tf_nc_test_rtr_1a.id}"

+ openstack_networking_router_v2.tf_nc_test_rtr_1a
    admin_state_up:                "true"
    distributed:                   ""
    external_gateway:              "df8d3f21-75f2-412a-8fd9-29de9b4a4fa8"
    name:                          "tf_nc_test_rtr_1a"
    region:                        "uk-1"
    tenant_id:                     ""
    value_specs.%:                 "1"
    value_specs.availability_zone: "uk-1a"

+ openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_icmp_in
    direction:         "ingress"
    ethertype:         "IPv4"
    port_range_max:    ""
    port_range_min:    ""
    protocol:          "icmp"
    region:            "uk-1"
    remote_group_id:   ""
    remote_ip_prefix:  "0.0.0.0/0"
    security_group_id: "${openstack_networking_secgroup_v2.tf_nc_test_sec_1.id}"
    tenant_id:         ""

+ openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_ssh_in
    direction:         "ingress"
    ethertype:         "IPv4"
    port_range_max:    "22"
    port_range_min:    "22"
    protocol:          "tcp"
    region:            "uk-1"
    remote_group_id:   ""
    remote_ip_prefix:  "0.0.0.0/0"
    security_group_id: "${openstack_networking_secgroup_v2.tf_nc_test_sec_1.id}"
    tenant_id:         ""

+ openstack_networking_secgroup_rule_v2.tf_nc_test_sec_rule_egress_metadata
    direction:         "egress"
    ethertype:         "IPv4"
    port_range_max:    "80"
    port_range_min:    "80"
    protocol:          "tcp"
    region:            "uk-1"
    remote_group_id:   ""
    remote_ip_prefix:  "169.254.169.254/32"
    security_group_id: "${openstack_networking_secgroup_v2.tf_nc_test_sec_1.id}"
    tenant_id:         ""

+ openstack_networking_secgroup_v2.tf_nc_test_sec_1
    description: "Security Group Via Terraform"
    name:        "tf_nc_test_sec_1"
    region:      "uk-1"
    tenant_id:   ""

+ openstack_networking_subnet_v2.tf_nc_test_1a_subnet
    allocation_pools.#:             "1"
    allocation_pools.0.end:         "192.168.70.250"
    allocation_pools.0.start:       "192.168.70.2"
    cidr:                           "192.168.70.0/24"
    dns_nameservers.#:              "1"
    dns_nameservers.3817307869:     "8.8.8.8"
    enable_dhcp:                    "true"
    gateway_ip:                     "192.168.70.1"
    host_routes.#:                  "1"
    host_routes.0.destination_cidr: "192.168.71.0/24"
    host_routes.0.next_hop:         "192.168.70.253"
    ip_version:                     "4"
    name:                           "tf_nc_test_1a_subnet"
    network_id:                     "${openstack_networking_network_v2.tf_nc_test_1a.id}"
    region:                         "uk-1"
    tenant_id:                      ""
    value_specs.%:                  "1"
    value_specs.availability_zone:  "uk-1a"


Plan: 11 to add, 0 to change, 0 to destroy.
grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ 

 

Once you’re happy with the result it’s time to actually deploy the server. Issue the ‘terraform apply’ command like so –

grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ date
Wed 17 May 20:04:09 BST 2017
grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ terraform apply
openstack_networking_secgroup_v2.tf_nc_test_sec_1: Creating...
  description: "" => "Security Group Via Terraform"
  name:        "" => "tf_nc_test_sec_1"
  region:      "" => "uk-1"
  tenant_id:   "" => "<computed>"
openstack_networking_router_v2.tf_nc_test_rtr_1a: Creating...
  admin_state_up:                "" => "true"
  distributed:                   "" => "<computed>"
  external_gateway:              "" => "df8d3f21-75f2-412a-8fd9-29de9b4a4fa8"
  name:                          "" => "tf_nc_test_rtr_1a"
  region:                        "" => "uk-1"
  tenant_id:                     "" => "<computed>"
  value_specs.%:                 "" => "1"
  value_specs.availability_zone: "" => "uk-1a"
openstack_compute_keypair_v2.tf-test-keypair-1a: Creating...
  name:                          "" => "tf-test-keypair-1a"
  public_key:                    "" => "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDK1XM3ZpYZuKuBsjUo0qy1VI01ROJakrx86Tk28XmQbDQrkS528yPU5MnjIz3OGk+mbRVr29oWX4iS+sYkYrqo01Z9/3Ui4STdALhfzwe/OOcevQ/45WOB/VcE991J5d9+yvvcohHUAP6XUUrpa3w9f032C98qeNzO/6IkICnkYl3JmlXoXdcNkbT+zWsVtS3yVOYOeX1jXQBzvIUYY0mEuCqJV6nK+39bwWlnzvfbE9UTGtE/gqX4f6oA7W1KG93AIIBYSUXOASe3GAnVE4D0UZ633bXpzdAyzddBPx1rKirBiNSPN7np3QOos8AiAQcjRCmlFOa53EyD/vK37tAX grazzer@grazzer-dev\n"
  region:                        "" => "uk-1"
  value_specs.%:                 "" => "1"
  value_specs.availability_zone: "" => "uk-1a"
openstack_networking_network_v2.tf_nc_test_1a: Creating...
  admin_state_up:                "" => "true"
  name:                          "" => "tf_nc_test_1a"
  region:                        "" => "uk-1"
  shared:                        "" => "<computed>"
  tenant_id:                     "" => "<computed>"
  value_specs.%:                 "" => "1"
  value_specs.availability_zone: "" => "uk-1a"
openstack_networking_secgroup_v2.tf_nc_test_sec_1: Creation complete (ID: a66fc94f-ba15-4e83-87f1-1089aeaca466)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_ssh_in: Creating...
  direction:         "" => "ingress"
  ethertype:         "" => "IPv4"
  port_range_max:    "" => "22"
  port_range_min:    "" => "22"
  protocol:          "" => "tcp"
  region:            "" => "uk-1"
  remote_group_id:   "" => "<computed>"
  remote_ip_prefix:  "" => "0.0.0.0/0"
  security_group_id: "" => "a66fc94f-ba15-4e83-87f1-1089aeaca466"
  tenant_id:         "" => "<computed>"
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_rule_egress_metadata: Creating...
  direction:         "" => "egress"
  ethertype:         "" => "IPv4"
  port_range_max:    "" => "80"
  port_range_min:    "" => "80"
  protocol:          "" => "tcp"
  region:            "" => "uk-1"
  remote_group_id:   "" => "<computed>"
  remote_ip_prefix:  "" => "169.254.169.254/32"
  security_group_id: "" => "a66fc94f-ba15-4e83-87f1-1089aeaca466"
  tenant_id:         "" => "<computed>"
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_icmp_in: Creating...
  direction:         "" => "ingress"
  ethertype:         "" => "IPv4"
  port_range_max:    "" => "<computed>"
  port_range_min:    "" => "<computed>"
  protocol:          "" => "icmp"
  region:            "" => "uk-1"
  remote_group_id:   "" => "<computed>"
  remote_ip_prefix:  "" => "0.0.0.0/0"
  security_group_id: "" => "a66fc94f-ba15-4e83-87f1-1089aeaca466"
  tenant_id:         "" => "<computed>"
openstack_compute_keypair_v2.tf-test-keypair-1a: Creation complete (ID: tf-test-keypair-1a)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_ssh_in: Creation complete (ID: 22217e4b-e018-41aa-a20a-5dbecd1390fe)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_rule_egress_metadata: Creation complete (ID: e6ca4ce8-9728-4f8a-a08b-b6c187f1abdd)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_icmp_in: Creation complete (ID: 38806129-3116-4451-95f5-ae376423fd3e)
openstack_networking_router_v2.tf_nc_test_rtr_1a: Creation complete (ID: d7b109a6-bb6f-4d06-9702-cd532f863741)
openstack_networking_network_v2.tf_nc_test_1a: Creation complete (ID: d32211be-4a8d-4a1d-8b48-0b2ac9d7e76b)
openstack_networking_subnet_v2.tf_nc_test_1a_subnet: Creating...
  allocation_pools.#:             "" => "1"
  allocation_pools.0.end:         "" => "192.168.70.250"
  allocation_pools.0.start:       "" => "192.168.70.2"
  cidr:                           "" => "192.168.70.0/24"
  dns_nameservers.#:              "" => "1"
  dns_nameservers.3817307869:     "" => "8.8.8.8"
  enable_dhcp:                    "" => "true"
  gateway_ip:                     "" => "192.168.70.1"
  host_routes.#:                  "" => "1"
  host_routes.0.destination_cidr: "" => "192.168.71.0/24"
  host_routes.0.next_hop:         "" => "192.168.70.253"
  ip_version:                     "" => "4"
  name:                           "" => "tf_nc_test_1a_subnet"
  network_id:                     "" => "d32211be-4a8d-4a1d-8b48-0b2ac9d7e76b"
  region:                         "" => "uk-1"
  tenant_id:                      "" => "<computed>"
  value_specs.%:                  "" => "1"
  value_specs.availability_zone:  "" => "uk-1a"
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Creating...
  access_ip_v4:                         "" => "<computed>"
  access_ip_v6:                         "" => "<computed>"
  all_metadata.%:                       "" => "<computed>"
  availability_zone:                    "" => "uk-1a"
  block_device.#:                       "" => "1"
  block_device.0.boot_index:            "" => "0"
  block_device.0.delete_on_termination: "" => "true"
  block_device.0.destination_type:      "" => "volume"
  block_device.0.source_type:           "" => "image"
  block_device.0.uuid:                  "" => "58fd966f-b055-4cd0-9012-cf6af7a4c32b"
  block_device.0.volume_size:           "" => "30"
  flavor_id:                            "" => "<computed>"
  flavor_name:                          "" => "T-1"
  force_delete:                         "" => "false"
  image_id:                             "" => "<computed>"
  image_name:                           "" => "<computed>"
  key_pair:                             "" => "tf-test-keypair-1a"
  metadata.%:                           "" => "1"
  metadata.demo:                        "" => "metadata"
  name:                                 "" => "tf_nc_test_1a_instance_1"
  network.#:                            "" => "1"
  network.0.access_network:             "" => "false"
  network.0.fixed_ip_v4:                "" => "<computed>"
  network.0.fixed_ip_v6:                "" => "<computed>"
  network.0.floating_ip:                "" => "<computed>"
  network.0.mac:                        "" => "<computed>"
  network.0.name:                       "" => "<computed>"
  network.0.port:                       "" => "<computed>"
  network.0.uuid:                       "" => "d32211be-4a8d-4a1d-8b48-0b2ac9d7e76b"
  region:                               "" => "uk-1"
  security_groups.#:                    "" => "1"
  security_groups.213421011:            "" => "tf_nc_test_sec_1"
  stop_before_destroy:                  "" => "false"
openstack_networking_subnet_v2.tf_nc_test_1a_subnet: Creation complete (ID: fa2335e1-228b-4967-943c-d68a51b5fd1f)
openstack_networking_port_v2.tf_nc_test_rtr_1a_subnet_int: Creating...
  admin_state_up:                "" => "true"
  all_fixed_ips.#:               "" => "<computed>"
  allowed_address_pairs.#:       "" => "<computed>"
  device_id:                     "" => "<computed>"
  device_owner:                  "" => "<computed>"
  fixed_ip.#:                    "" => "1"
  fixed_ip.0.ip_address:         "" => "192.168.70.1"
  fixed_ip.0.subnet_id:          "" => "fa2335e1-228b-4967-943c-d68a51b5fd1f"
  mac_address:                   "" => "<computed>"
  name:                          "" => "tf_nc_test_rtr_1a_subnet_int"
  network_id:                    "" => "d32211be-4a8d-4a1d-8b48-0b2ac9d7e76b"
  region:                        "" => "uk-1"
  security_group_ids.#:          "" => "<computed>"
  tenant_id:                     "" => "<computed>"
  value_specs.%:                 "" => "1"
  value_specs.availability_zone: "" => "uk-1a"
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Still creating... (10s elapsed)
openstack_networking_port_v2.tf_nc_test_rtr_1a_subnet_int: Creation complete (ID: e8aa8f6c-602c-483f-a215-d4f1ef5c4152)
openstack_networking_router_interface_v2.tf_nc_test_rtr_1a_if_1: Creating...
  port_id:   "" => "e8aa8f6c-602c-483f-a215-d4f1ef5c4152"
  region:    "" => "uk-1"
  router_id: "" => "d7b109a6-bb6f-4d06-9702-cd532f863741"
openstack_networking_router_interface_v2.tf_nc_test_rtr_1a_if_1: Creation complete (ID: e8aa8f6c-602c-483f-a215-d4f1ef5c4152)
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Still creating... (20s elapsed)
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Still creating... (30s elapsed)
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Still creating... (40s elapsed)
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Still creating... (50s elapsed)
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Still creating... (1m0s elapsed)
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Creation complete (ID: bd516e9d-8cbd-44c1-a061-861b029e37ee)

Apply complete! Resources: 11 added, 0 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: 
grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ date
Wed 17 May 20:05:37 BST 2017
grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ ls
files     k5-security-groups.tf  terraform.tfstate
k5-1a.tf  providers.tf           variables.tf
grazzer@grazzer-dev:~/Dev/terraform/Working Demo$

 

And then finally to tidy it all up again once finished with the testing issue the ‘terraform destroy’ command –

grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ date
Wed 17 May 20:08:24 BST 2017
grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ 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_secgroup_v2.tf_nc_test_sec_1: Refreshing state... (ID: a66fc94f-ba15-4e83-87f1-1089aeaca466)
openstack_networking_router_v2.tf_nc_test_rtr_1a: Refreshing state... (ID: d7b109a6-bb6f-4d06-9702-cd532f863741)
openstack_compute_keypair_v2.tf-test-keypair-1a: Refreshing state... (ID: tf-test-keypair-1a)
openstack_networking_network_v2.tf_nc_test_1a: Refreshing state... (ID: d32211be-4a8d-4a1d-8b48-0b2ac9d7e76b)
openstack_networking_subnet_v2.tf_nc_test_1a_subnet: Refreshing state... (ID: fa2335e1-228b-4967-943c-d68a51b5fd1f)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_rule_egress_metadata: Refreshing state... (ID: e6ca4ce8-9728-4f8a-a08b-b6c187f1abdd)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_ssh_in: Refreshing state... (ID: 22217e4b-e018-41aa-a20a-5dbecd1390fe)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_icmp_in: Refreshing state... (ID: 38806129-3116-4451-95f5-ae376423fd3e)
openstack_networking_port_v2.tf_nc_test_rtr_1a_subnet_int: Refreshing state... (ID: e8aa8f6c-602c-483f-a215-d4f1ef5c4152)
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Refreshing state... (ID: bd516e9d-8cbd-44c1-a061-861b029e37ee)
openstack_networking_router_interface_v2.tf_nc_test_rtr_1a_if_1: Refreshing state... (ID: e8aa8f6c-602c-483f-a215-d4f1ef5c4152)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_ssh_in: Destroying... (ID: 22217e4b-e018-41aa-a20a-5dbecd1390fe)
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Destroying... (ID: bd516e9d-8cbd-44c1-a061-861b029e37ee)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_icmp_in: Destroying... (ID: 38806129-3116-4451-95f5-ae376423fd3e)
openstack_networking_router_interface_v2.tf_nc_test_rtr_1a_if_1: Destroying... (ID: e8aa8f6c-602c-483f-a215-d4f1ef5c4152)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_rule_egress_metadata: Destroying... (ID: e6ca4ce8-9728-4f8a-a08b-b6c187f1abdd)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_ssh_in: Destruction complete
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_rule_egress_metadata: Destruction complete
openstack_networking_router_interface_v2.tf_nc_test_rtr_1a_if_1: Destruction complete
openstack_networking_port_v2.tf_nc_test_rtr_1a_subnet_int: Destroying... (ID: e8aa8f6c-602c-483f-a215-d4f1ef5c4152)
openstack_networking_router_v2.tf_nc_test_rtr_1a: Destroying... (ID: d7b109a6-bb6f-4d06-9702-cd532f863741)
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_icmp_in: Still destroying... (ID: 38806129-3116-4451-95f5-ae376423fd3e, 10s elapsed)
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Still destroying... (ID: bd516e9d-8cbd-44c1-a061-861b029e37ee, 10s elapsed)
openstack_compute_instance_v2.tf_nc_test_1a_instance_1: Destruction complete
openstack_compute_keypair_v2.tf-test-keypair-1a: Destroying... (ID: tf-test-keypair-1a)
openstack_compute_keypair_v2.tf-test-keypair-1a: Destruction complete
openstack_networking_secgroup_rule_v2.tf_nc_test_sec_1_rule_icmp_in: Destruction complete
openstack_networking_secgroup_v2.tf_nc_test_sec_1: Destroying... (ID: a66fc94f-ba15-4e83-87f1-1089aeaca466)
openstack_networking_port_v2.tf_nc_test_rtr_1a_subnet_int: Destruction complete
openstack_networking_subnet_v2.tf_nc_test_1a_subnet: Destroying... (ID: fa2335e1-228b-4967-943c-d68a51b5fd1f)
openstack_networking_router_v2.tf_nc_test_rtr_1a: Destruction complete
openstack_networking_secgroup_v2.tf_nc_test_sec_1: Destruction complete
openstack_networking_subnet_v2.tf_nc_test_1a_subnet: Destruction complete
openstack_networking_network_v2.tf_nc_test_1a: Destroying... (ID: d32211be-4a8d-4a1d-8b48-0b2ac9d7e76b)
openstack_networking_network_v2.tf_nc_test_1a: Destruction complete

Destroy complete! Resources: 11 destroyed.
grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ date
Wed 17 May 20:09:22 BST 2017
grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ ls
files     k5-security-groups.tf  terraform.tfstate         variables.tf
k5-1a.tf  providers.tf           terraform.tfstate.backup
grazzer@grazzer-dev:~/Dev/terraform/Working Demo$ 

Happy Stacking!

#withk5youcan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s