Advertisement
aidjek

GCP_Loadbalancer2_OTUS_HW6

Oct 27th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 54.87 KB | None | 0 0
  1. > ~/P/O/D/g/a/terraform on terraform-1 ⨯ terraform destroy                                                                                11:46:18
  2. google_compute_http_health_check.ruby_http_port: Refreshing state... (ID: ruby-http-port)
  3. google_compute_firewall.firewall_puma: Refreshing state... (ID: allow-puma-default)
  4. google_compute_instance.app[1]: Refreshing state... (ID: reddit-app-1)
  5. google_compute_instance.app[0]: Refreshing state... (ID: reddit-app-0)
  6. google_compute_target_pool.ruby_cluster: Refreshing state... (ID: ruby-cluster)
  7.  
  8. An execution plan has been generated and is shown below.
  9. Resource actions are indicated with the following symbols:
  10.   - destroy
  11.  
  12. Terraform will perform the following actions:
  13.  
  14.   - google_compute_firewall.firewall_puma
  15.  
  16.   - google_compute_http_health_check.ruby_http_port
  17.  
  18.   - google_compute_instance.app[0]
  19.  
  20.   - google_compute_instance.app[1]
  21.  
  22.   - google_compute_target_pool.ruby_cluster
  23.  
  24.  
  25. Plan: 0 to add, 0 to change, 5 to destroy.
  26.  
  27. Do you really want to destroy all resources?
  28.   Terraform will destroy all your managed infrastructure, as shown above.
  29.   There is no undo. Only 'yes' will be accepted to confirm.
  30.  
  31.   Enter a value: yes
  32.  
  33. google_compute_firewall.firewall_puma: Destroying... (ID: allow-puma-default)
  34. google_compute_target_pool.ruby_cluster: Destroying... (ID: ruby-cluster)
  35. google_compute_firewall.firewall_puma: Still destroying... (ID: allow-puma-default, 10s elapsed)
  36. google_compute_target_pool.ruby_cluster: Still destroying... (ID: ruby-cluster, 10s elapsed)
  37. google_compute_firewall.firewall_puma: Destruction complete after 11s
  38. google_compute_target_pool.ruby_cluster: Destruction complete after 12s
  39. google_compute_http_health_check.ruby_http_port: Destroying... (ID: ruby-http-port)
  40. google_compute_instance.app[0]: Destroying... (ID: reddit-app-0)
  41. google_compute_instance.app[1]: Destroying... (ID: reddit-app-1)
  42. google_compute_instance.app.1: Still destroying... (ID: reddit-app-1, 10s elapsed)
  43. google_compute_http_health_check.ruby_http_port: Still destroying... (ID: ruby-http-port, 10s elapsed)
  44. google_compute_instance.app.0: Still destroying... (ID: reddit-app-0, 10s elapsed)
  45. google_compute_http_health_check.ruby_http_port: Destruction complete after 11s
  46. google_compute_instance.app.0: Still destroying... (ID: reddit-app-0, 20s elapsed)
  47. google_compute_instance.app.1: Still destroying... (ID: reddit-app-1, 20s elapsed)
  48. google_compute_instance.app[1]: Destruction complete after 26s
  49. google_compute_instance.app.0: Still destroying... (ID: reddit-app-0, 30s elapsed)
  50. google_compute_instance.app.0: Still destroying... (ID: reddit-app-0, 40s elapsed)
  51. google_compute_instance.app.0: Still destroying... (ID: reddit-app-0, 50s elapsed)
  52. google_compute_instance.app.0: Still destroying... (ID: reddit-app-0, 1m0s elapsed)
  53. google_compute_instance.app.0: Still destroying... (ID: reddit-app-0, 1m10s elapsed)
  54. google_compute_instance.app.0: Still destroying... (ID: reddit-app-0, 1m20s elapsed)
  55. google_compute_instance.app.0: Still destroying... (ID: reddit-app-0, 1m30s elapsed)
  56. google_compute_instance.app.0: Still destroying... (ID: reddit-app-0, 1m40s elapsed)
  57. google_compute_instance.app.0: Still destroying... (ID: reddit-app-0, 1m50s elapsed)
  58. google_compute_instance.app[0]: Destruction complete after 1m50s
  59.  
  60. Destroy complete! Resources: 5 destroyed.
  61. > ~/P/O/D/g/a/terraform on terraform-1 ⨯ terraform plan                                                                                   11:49:14
  62. Refreshing Terraform state in-memory prior to plan...
  63. The refreshed state will be used to calculate this plan, but will not be
  64. persisted to local or remote state storage.
  65.  
  66.  
  67. ------------------------------------------------------------------------
  68.  
  69. An execution plan has been generated and is shown below.
  70. Resource actions are indicated with the following symbols:
  71.   + create
  72.  
  73. Terraform will perform the following actions:
  74.  
  75.   + google_compute_firewall.firewall_puma
  76.       id:                                                  <computed>
  77.       allow.#:                                             "1"
  78.       allow.931060522.ports.#:                             "1"
  79.       allow.931060522.ports.0:                             "9292"
  80.       allow.931060522.protocol:                            "tcp"
  81.       destination_ranges.#:                                <computed>
  82.       name:                                                "allow-puma-default"
  83.       network:                                             "default"
  84.       priority:                                            "1000"
  85.       project:                                             <computed>
  86.       self_link:                                           <computed>
  87.       source_ranges.#:                                     "1"
  88.       source_ranges.1080289494:                            "0.0.0.0/0"
  89.       target_tags.#:                                       "1"
  90.       target_tags.1799682348:                              "reddit-app"
  91.  
  92.   + google_compute_global_forwarding_rule.ruby-forwarding
  93.       id:                                                  <computed>
  94.       ip_address:                                          <computed>
  95.       ip_protocol:                                         <computed>
  96.       label_fingerprint:                                   <computed>
  97.       name:                                                "ruby-forwarding"
  98.       port_range:                                          "9292"
  99.       project:                                             <computed>
  100.       self_link:                                           <computed>
  101.       target:                                              "${google_compute_target_pool.ruby_cluster.self_link}"
  102.  
  103.   + google_compute_http_health_check.ruby_http_port
  104.       id:                                                  <computed>
  105.       check_interval_sec:                                  "3"
  106.       healthy_threshold:                                   "2"
  107.       name:                                                "ruby-http-port"
  108.       port:                                                "9292"
  109.       project:                                             <computed>
  110.       request_path:                                        "/"
  111.       self_link:                                           <computed>
  112.       timeout_sec:                                         "1"
  113.       unhealthy_threshold:                                 "2"
  114.  
  115.   + google_compute_instance.app[0]
  116.       id:                                                  <computed>
  117.       boot_disk.#:                                         "1"
  118.       boot_disk.0.auto_delete:                             "true"
  119.       boot_disk.0.device_name:                             <computed>
  120.       boot_disk.0.disk_encryption_key_sha256:              <computed>
  121.       boot_disk.0.initialize_params.#:                     "1"
  122.       boot_disk.0.initialize_params.0.image:               "reddit-base"
  123.       can_ip_forward:                                      "false"
  124.       cpu_platform:                                        <computed>
  125.       create_timeout:                                      "4"
  126.       instance_id:                                         <computed>
  127.       label_fingerprint:                                   <computed>
  128.       machine_type:                                        "g1-small"
  129.       metadata.%:                                          "1"
  130.       metadata.ssh-keys:                                   "appuser:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5uy2SzmovqakU6p9B05hzjv/+rd+TLETg1U1gQLVqAqdQQ8zcio7sViIo3aslDYXbX9R3S4sGrDtOpSKoY08SCjbHldXcsdru/HsmitZM/FDSnZoUbQA1EgZIobP93pIy202w0MR36cA6RjbHIDpwwlfSZazCAA90KngR6SLWKXiscxO4Wn7RgIo5gKWwRLryU20l+60dZlyozuZzizGXmk/vPMGK+6nG1DWrubgxTJbiTkg+Lvt3wGlHFSzJG1W3RDrpSVHMcif6WhyJWk1f8Q0DCs33m6o3h+KfWJwVNRpRMWuPISWS8JAmqWjLeYic/y9VV41Stfd3hSzWI2N9 appuser\n"
  131.       metadata_fingerprint:                                <computed>
  132.       name:                                                "reddit-app-0"
  133.       network_interface.#:                                 "1"
  134.       network_interface.0.access_config.#:                 "1"
  135.       network_interface.0.access_config.0.assigned_nat_ip: <computed>
  136.       network_interface.0.access_config.0.nat_ip:          <computed>
  137.       network_interface.0.address:                         <computed>
  138.       network_interface.0.name:                            <computed>
  139.       network_interface.0.network:                         "default"
  140.       network_interface.0.network_ip:                      <computed>
  141.       network_interface.0.subnetwork_project:              <computed>
  142.       project:                                             <computed>
  143.       scheduling.#:                                        <computed>
  144.       self_link:                                           <computed>
  145.       tags.#:                                              "1"
  146.       tags.1799682348:                                     "reddit-app"
  147.       tags_fingerprint:                                    <computed>
  148.       zone:                                                "europe-west1-b"
  149.  
  150.   + google_compute_instance.app[1]
  151.       id:                                                  <computed>
  152.       boot_disk.#:                                         "1"
  153.       boot_disk.0.auto_delete:                             "true"
  154.       boot_disk.0.device_name:                             <computed>
  155.       boot_disk.0.disk_encryption_key_sha256:              <computed>
  156.       boot_disk.0.initialize_params.#:                     "1"
  157.       boot_disk.0.initialize_params.0.image:               "reddit-base"
  158.       can_ip_forward:                                      "false"
  159.       cpu_platform:                                        <computed>
  160.       create_timeout:                                      "4"
  161.       instance_id:                                         <computed>
  162.       label_fingerprint:                                   <computed>
  163.       machine_type:                                        "g1-small"
  164.       metadata.%:                                          "1"
  165.       metadata.ssh-keys:                                   "appuser:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5uy2SzmovqakU6p9B05hzjv/+rd+TLETg1U1gQLVqAqdQQ8zcio7sViIo3aslDYXbX9R3S4sGrDtOpSKoY08SCjbHldXcsdru/HsmitZM/FDSnZoUbQA1EgZIobP93pIy202w0MR36cA6RjbHIDpwwlfSZazCAA90KngR6SLWKXiscxO4Wn7RgIo5gKWwRLryU20l+60dZlyozuZzizGXmk/vPMGK+6nG1DWrubgxTJbiTkg+Lvt3wGlHFSzJG1W3RDrpSVHMcif6WhyJWk1f8Q0DCs33m6o3h+KfWJwVNRpRMWuPISWS8JAmqWjLeYic/y9VV41Stfd3hSzWI2N9 appuser\n"
  166.       metadata_fingerprint:                                <computed>
  167.       name:                                                "reddit-app-1"
  168.       network_interface.#:                                 "1"
  169.       network_interface.0.access_config.#:                 "1"
  170.       network_interface.0.access_config.0.assigned_nat_ip: <computed>
  171.       network_interface.0.access_config.0.nat_ip:          <computed>
  172.       network_interface.0.address:                         <computed>
  173.       network_interface.0.name:                            <computed>
  174.       network_interface.0.network:                         "default"
  175.       network_interface.0.network_ip:                      <computed>
  176.       network_interface.0.subnetwork_project:              <computed>
  177.       project:                                             <computed>
  178.       scheduling.#:                                        <computed>
  179.       self_link:                                           <computed>
  180.       tags.#:                                              "1"
  181.       tags.1799682348:                                     "reddit-app"
  182.       tags_fingerprint:                                    <computed>
  183.       zone:                                                "europe-west2-b"
  184.  
  185.   + google_compute_target_pool.ruby_cluster
  186.       id:                                                  <computed>
  187.       health_checks.#:                                     <computed>
  188.       instances.#:                                         <computed>
  189.       name:                                                "ruby-cluster"
  190.       project:                                             <computed>
  191.       region:                                              <computed>
  192.       self_link:                                           <computed>
  193.       session_affinity:                                    "NONE"
  194.  
  195.  
  196. Plan: 6 to add, 0 to change, 0 to destroy.
  197.  
  198. ------------------------------------------------------------------------
  199.  
  200. Note: You didn't specify an "-out" parameter to save this plan, so Terraform
  201. can't guarantee that exactly these actions will be performed if
  202. "terraform apply" is subsequently run.
  203.  
  204. > ~/P/O/D/g/a/terraform on terraform-1 ⨯ terraform apply --auto-approve=true                                                              11:51:12
  205. google_compute_http_health_check.ruby_http_port: Creating...
  206.   check_interval_sec:  "" => "3"
  207.   healthy_threshold:   "" => "2"
  208.   name:                "" => "ruby-http-port"
  209.   port:                "" => "9292"
  210.   project:             "" => "<computed>"
  211.   request_path:        "" => "/"
  212.   self_link:           "" => "<computed>"
  213.   timeout_sec:         "" => "1"
  214.   unhealthy_threshold: "" => "2"
  215. google_compute_firewall.firewall_puma: Creating...
  216.   allow.#:                  "" => "1"
  217.   allow.931060522.ports.#:  "" => "1"
  218.   allow.931060522.ports.0:  "" => "9292"
  219.   allow.931060522.protocol: "" => "tcp"
  220.   destination_ranges.#:     "" => "<computed>"
  221.   name:                     "" => "allow-puma-default"
  222.   network:                  "" => "default"
  223.   priority:                 "" => "1000"
  224.   project:                  "" => "<computed>"
  225.   self_link:                "" => "<computed>"
  226.   source_ranges.#:          "" => "1"
  227.   source_ranges.1080289494: "" => "0.0.0.0/0"
  228.   target_tags.#:            "" => "1"
  229.   target_tags.1799682348:   "" => "reddit-app"
  230. google_compute_instance.app[0]: Creating...
  231.   boot_disk.#:                                         "" => "1"
  232.   boot_disk.0.auto_delete:                             "" => "true"
  233.   boot_disk.0.device_name:                             "" => "<computed>"
  234.   boot_disk.0.disk_encryption_key_sha256:              "" => "<computed>"
  235.   boot_disk.0.initialize_params.#:                     "" => "1"
  236.   boot_disk.0.initialize_params.0.image:               "" => "reddit-base"
  237.   can_ip_forward:                                      "" => "false"
  238.   cpu_platform:                                        "" => "<computed>"
  239.   create_timeout:                                      "" => "4"
  240.   instance_id:                                         "" => "<computed>"
  241.   label_fingerprint:                                   "" => "<computed>"
  242.   machine_type:                                        "" => "g1-small"
  243.   metadata.%:                                          "" => "1"
  244.   metadata.ssh-keys:                                   "" => "appuser:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5uy2SzmovqakU6p9B05hzjv/+rd+TLETg1U1gQLVqAqdQQ8zcio7sViIo3aslDYXbX9R3S4sGrDtOpSKoY08SCjbHldXcsdru/HsmitZM/FDSnZoUbQA1EgZIobP93pIy202w0MR36cA6RjbHIDpwwlfSZazCAA90KngR6SLWKXiscxO4Wn7RgIo5gKWwRLryU20l+60dZlyozuZzizGXmk/vPMGK+6nG1DWrubgxTJbiTkg+Lvt3wGlHFSzJG1W3RDrpSVHMcif6WhyJWk1f8Q0DCs33m6o3h+KfWJwVNRpRMWuPISWS8JAmqWjLeYic/y9VV41Stfd3hSzWI2N9 appuser\n"
  245.   metadata_fingerprint:                                "" => "<computed>"
  246.   name:                                                "" => "reddit-app-0"
  247.   network_interface.#:                                 "" => "1"
  248.   network_interface.0.access_config.#:                 "" => "1"
  249.   network_interface.0.access_config.0.assigned_nat_ip: "" => "<computed>"
  250.   network_interface.0.access_config.0.nat_ip:          "" => "<computed>"
  251.   network_interface.0.address:                         "" => "<computed>"
  252.   network_interface.0.name:                            "" => "<computed>"
  253.   network_interface.0.network:                         "" => "default"
  254.   network_interface.0.network_ip:                      "" => "<computed>"
  255.   network_interface.0.subnetwork_project:              "" => "<computed>"
  256.   project:                                             "" => "<computed>"
  257.   scheduling.#:                                        "" => "<computed>"
  258.   self_link:                                           "" => "<computed>"
  259.   tags.#:                                              "" => "1"
  260.   tags.1799682348:                                     "" => "reddit-app"
  261.   tags_fingerprint:                                    "" => "<computed>"
  262.   zone:                                                "" => "europe-west1-b"
  263. google_compute_instance.app[1]: Creating...
  264.   boot_disk.#:                                         "" => "1"
  265.   boot_disk.0.auto_delete:                             "" => "true"
  266.   boot_disk.0.device_name:                             "" => "<computed>"
  267.   boot_disk.0.disk_encryption_key_sha256:              "" => "<computed>"
  268.   boot_disk.0.initialize_params.#:                     "" => "1"
  269.   boot_disk.0.initialize_params.0.image:               "" => "reddit-base"
  270.   can_ip_forward:                                      "" => "false"
  271.   cpu_platform:                                        "" => "<computed>"
  272.   create_timeout:                                      "" => "4"
  273.   instance_id:                                         "" => "<computed>"
  274.   label_fingerprint:                                   "" => "<computed>"
  275.   machine_type:                                        "" => "g1-small"
  276.   metadata.%:                                          "" => "1"
  277.   metadata.ssh-keys:                                   "" => "appuser:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5uy2SzmovqakU6p9B05hzjv/+rd+TLETg1U1gQLVqAqdQQ8zcio7sViIo3aslDYXbX9R3S4sGrDtOpSKoY08SCjbHldXcsdru/HsmitZM/FDSnZoUbQA1EgZIobP93pIy202w0MR36cA6RjbHIDpwwlfSZazCAA90KngR6SLWKXiscxO4Wn7RgIo5gKWwRLryU20l+60dZlyozuZzizGXmk/vPMGK+6nG1DWrubgxTJbiTkg+Lvt3wGlHFSzJG1W3RDrpSVHMcif6WhyJWk1f8Q0DCs33m6o3h+KfWJwVNRpRMWuPISWS8JAmqWjLeYic/y9VV41Stfd3hSzWI2N9 appuser\n"
  278.   metadata_fingerprint:                                "" => "<computed>"
  279.   name:                                                "" => "reddit-app-1"
  280.   network_interface.#:                                 "" => "1"
  281.   network_interface.0.access_config.#:                 "" => "1"
  282.   network_interface.0.access_config.0.assigned_nat_ip: "" => "<computed>"
  283.   network_interface.0.access_config.0.nat_ip:          "" => "<computed>"
  284.   network_interface.0.address:                         "" => "<computed>"
  285.   network_interface.0.name:                            "" => "<computed>"
  286.   network_interface.0.network:                         "" => "default"
  287.   network_interface.0.network_ip:                      "" => "<computed>"
  288.   network_interface.0.subnetwork_project:              "" => "<computed>"
  289.   project:                                             "" => "<computed>"
  290.   scheduling.#:                                        "" => "<computed>"
  291.   self_link:                                           "" => "<computed>"
  292.   tags.#:                                              "" => "1"
  293.   tags.1799682348:                                     "" => "reddit-app"
  294.   tags_fingerprint:                                    "" => "<computed>"
  295.   zone:                                                "" => "europe-west2-b"
  296. google_compute_http_health_check.ruby_http_port: Still creating... (10s elapsed)
  297. google_compute_firewall.firewall_puma: Still creating... (10s elapsed)
  298. google_compute_instance.app.1: Still creating... (10s elapsed)
  299. google_compute_instance.app.0: Still creating... (10s elapsed)
  300. google_compute_http_health_check.ruby_http_port: Creation complete after 13s (ID: ruby-http-port)
  301. google_compute_firewall.firewall_puma: Creation complete after 13s (ID: allow-puma-default)
  302. google_compute_instance.app[1]: Provisioning with 'file'...
  303. google_compute_instance.app.0: Still creating... (20s elapsed)
  304. google_compute_instance.app.1: Still creating... (20s elapsed)
  305. google_compute_instance.app.1: Still creating... (30s elapsed)
  306. google_compute_instance.app.0: Still creating... (30s elapsed)
  307. google_compute_instance.app[0]: Provisioning with 'file'...
  308. google_compute_instance.app[1]: Provisioning with 'remote-exec'...
  309. google_compute_instance.app[1] (remote-exec): Connecting to remote host via SSH...
  310. google_compute_instance.app[1] (remote-exec):   Host: 35.189.123.0
  311. google_compute_instance.app[1] (remote-exec):   User: appuser
  312. google_compute_instance.app[1] (remote-exec):   Password: false
  313. google_compute_instance.app[1] (remote-exec):   Private key: true
  314. google_compute_instance.app[1] (remote-exec):   SSH Agent: false
  315. google_compute_instance.app[1] (remote-exec):   Checking Host Key: false
  316. google_compute_instance.app[1] (remote-exec): Connected!
  317. google_compute_instance.app.0: Still creating... (40s elapsed)
  318. google_compute_instance.app.1: Still creating... (40s elapsed)
  319. google_compute_instance.app[1] (remote-exec): Cloning into '/home/appuser/reddit''remote-exec'...
  320. google_compute_instance.app[0] (remote-exec): Connecting to remote host via SSH...
  321. google_compute_instance.app[0] (remote-exec):   Host: 35.241.194.159
  322. google_compute_instance.app[0] (remote-exec):   User: appuser
  323. google_compute_instance.app[0] (remote-exec):   Password: false
  324. google_compute_instance.app[0] (remote-exec):   Private key: true
  325. google_compute_instance.app[0] (remote-exec):   SSH Agent: false
  326. google_compute_instance.app[0] (remote-exec):   Checking Host Key: false
  327. google_compute_instance.app[0] (remote-exec): Connected!
  328. google_compute_instance.app[0] (remote-exec): Cloning into '/home/appuser/reddit'#:  "" => "1"
  329.   health_checks.0:  "" => "https://www.googleapis.com/compute/v1/projects/aidjek-infrastructure/global/httpHealthChecks/ruby-http-port"
  330.   instances.#:      "" => "1"
  331.   instances.0:      "" => "https://www.googleapis.com/compute/v1/projects/aidjek-infrastructure/zones/europe-west1-b/instances/reddit-app-0"
  332.   name:             "" => "ruby-cluster"
  333.   project:          "" => "<computed>"
  334.   region:           "" => "<computed>"
  335.   self_link:        "" => "<computed>"
  336.   session_affinity: "" => "NONE"
  337. google_compute_target_pool.ruby_cluster: Still creating... (10s elapsed)
  338. google_compute_target_pool.ruby_cluster: Creation complete after 12s (ID: ruby-cluster)
  339. google_compute_global_forwarding_rule.ruby-forwarding: Creating...
  340.   ip_address:        "" => "<computed>"
  341.   ip_protocol:       "" => "<computed>"
  342.   label_fingerprint: "" => "<computed>"
  343.   name:              "" => "ruby-forwarding"
  344.   port_range:        "" => "9292"
  345.   project:           "" => "<computed>"
  346.   self_link:         "" => "<computed>"
  347.   target:            "" => "https://www.googleapis.com/compute/v1/projects/aidjek-infrastructure/regions/europe-west1/targetPools/ruby-cluster"
  348.  
  349. Error: Error applying plan:
  350.  
  351. 1 error(s) occurred:
  352.  
  353. * google_compute_global_forwarding_rule.ruby-forwarding: 1 error(s) occurred:
  354.  
  355. * google_compute_global_forwarding_rule.ruby-forwarding: Error creating Global Forwarding Rule: googleapi: Error 400: Invalid value for field 'resource.target': 'https://www.googleapis.com/compute/v1/projects/aidjek-infrastructure/regions/europe-west1/targetPools/ruby-cluster'. Invalid target type TARGET_POOL for forwarding rule in scope GLOBAL, invalid
  356.  
  357. Terraform does not automatically rollback in the face of errors.
  358. Instead, your Terraform state file has been partially updated with
  359. any resources that successfully completed. Please address the error
  360. above and apply again to incrementally change your infrastructure.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement