Skip to content

Instantly share code, notes, and snippets.

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 petervandenabeele/c9949fa4590086b998683b1184095755 to your computer and use it in GitHub Desktop.
Save petervandenabeele/c9949fa4590086b998683b1184095755 to your computer and use it in GitHub Desktop.
TERRAFORM CRASH in DigitalOcean provider
➜ experiment_01_02_digital_ocean_droplet git:(master) ✗ terraform -version
Terraform v0.11.3
+ provider.digitalocean v0.1.3
➜ experiment_01_02_digital_ocean_droplet git:(master) ✗ cat template.tf
# Configure the DigitalOcean Provider
provider "digitalocean" {
}
# Create a test server
resource "digitalocean_droplet" "test" {
image = "ubuntu-16-04-x64"
name = "test-1"
region = "ams3"
size = "4gb"
ssh_keys = [23266]
# private_networking = true
}
➜ experiment_01_02_digital_ocean_droplet git:(master) ✗ 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.
------------------------------------------------------------------------
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
+ digitalocean_droplet.test
id: <computed>
disk: <computed>
image: "ubuntu-16-04-x64"
ipv4_address: <computed>
ipv4_address_private: <computed>
ipv6_address: <computed>
ipv6_address_private: <computed>
locked: <computed>
name: "test-1"
price_hourly: <computed>
price_monthly: <computed>
region: "ams3"
resize_disk: "true"
size: "4gb"
ssh_keys.#: "1"
ssh_keys.0: "23266"
status: <computed>
vcpus: <computed>
Plan: 1 to add, 0 to change, 0 to destroy.
------------------------------------------------------------------------
Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
➜ experiment_01_02_digital_ocean_droplet git:(master) ✗ terraform apply
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
+ digitalocean_droplet.test
id: <computed>
disk: <computed>
image: "ubuntu-16-04-x64"
ipv4_address: <computed>
ipv4_address_private: <computed>
ipv6_address: <computed>
ipv6_address_private: <computed>
locked: <computed>
name: "test-1"
price_hourly: <computed>
price_monthly: <computed>
region: "ams3"
resize_disk: "true"
size: "4gb"
ssh_keys.#: "1"
ssh_keys.0: "23266"
status: <computed>
vcpus: <computed>
Plan: 1 to add, 0 to change, 0 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
digitalocean_droplet.test: Creating...
disk: "" => "<computed>"
image: "" => "ubuntu-16-04-x64"
ipv4_address: "" => "<computed>"
ipv4_address_private: "" => "<computed>"
ipv6_address: "" => "<computed>"
ipv6_address_private: "" => "<computed>"
locked: "" => "<computed>"
name: "" => "test-1"
price_hourly: "" => "<computed>"
price_monthly: "" => "<computed>"
region: "" => "ams3"
resize_disk: "" => "true"
size: "" => "4gb"
ssh_keys.#: "" => "1"
ssh_keys.0: "" => "23266"
status: "" => "<computed>"
vcpus: "" => "<computed>"
digitalocean_droplet.test: Still creating... (10s elapsed)
digitalocean_droplet.test: Still creating... (20s elapsed)
digitalocean_droplet.test: Creation complete after 26s (ID: 82094783)
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
➜ experiment_01_02_digital_ocean_droplet git:(master) ✗ vim template.tf
➜ experiment_01_02_digital_ocean_droplet git:(master) ✗ cat template.tf
# Configure the DigitalOcean Provider
provider "digitalocean" {
}
# Create a test server
resource "digitalocean_droplet" "test" {
image = "ubuntu-16-04-x64"
name = "test-1"
region = "ams3"
size = "4gb"
ssh_keys = [23266]
private_networking = true
}
➜ experiment_01_02_digital_ocean_droplet git:(master) ✗ 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.
digitalocean_droplet.test: Refreshing state... (ID: 82094783)
------------------------------------------------------------------------
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
~ digitalocean_droplet.test
private_networking: "" => "true"
Plan: 0 to add, 1 to change, 0 to destroy.
------------------------------------------------------------------------
Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
➜ experiment_01_02_digital_ocean_droplet git:(master) ✗ terraform apply
digitalocean_droplet.test: Refreshing state... (ID: 82094783)
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
~ digitalocean_droplet.test
private_networking: "" => "true"
Plan: 0 to add, 1 to change, 0 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
digitalocean_droplet.test: Modifying... (ID: 82094783)
private_networking: "" => "true"
digitalocean_droplet.test: Still modifying... (ID: 82094783, 10s elapsed)
Error: Error applying plan:
1 error(s) occurred:
* digitalocean_droplet.test: 1 error(s) occurred:
* digitalocean_droplet.test: unexpected EOF
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.
panic: interface conversion: interface {} is bool, not string
2018-02-11T19:37:15.232+0100 [DEBUG] plugin.terraform-provider-digitalocean_v0.1.3_x4:
2018-02-11T19:37:15.232+0100 [DEBUG] plugin.terraform-provider-digitalocean_v0.1.3_x4: goroutine 84 [running]:
2018-02-11T19:37:15.232+0100 [DEBUG] plugin.terraform-provider-digitalocean_v0.1.3_x4: github.com/terraform-providers/terraform-provider-digitalocean/digitalocean.newDropletStateRefreshFunc.func1(0xc420421f20, 0x1, 0x0, 0x0, 0xc42005a1e0, 0x1bc15e0)
2018-02-11T19:37:15.232+0100 [DEBUG] plugin.terraform-provider-digitalocean_v0.1.3_x4: /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-digitalocean/digitalocean/resource_digitalocean_droplet.go:619 +0x5af
2018-02-11T19:37:15.232+0100 [DEBUG] plugin.terraform-provider-digitalocean_v0.1.3_x4: github.com/terraform-providers/terraform-provider-digitalocean/vendor/github.com/hashicorp/terraform/helper/resource.(*StateChangeConf).WaitForState.func1(0xc420273560, 0xc420165e30, 0xc420540b80, 0xc420224960, 0xc4204e26a0, 0xc4204e2688)
2018-02-11T19:37:15.232+0100 [DEBUG] plugin.terraform-provider-digitalocean_v0.1.3_x4: /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-digitalocean/vendor/github.com/hashicorp/terraform/helper/resource/state.go:103 +0x4e0
2018-02-11T19:37:15.232+0100 [DEBUG] plugin.terraform-provider-digitalocean_v0.1.3_x4: created by github.com/terraform-providers/terraform-provider-digitalocean/vendor/github.com/hashicorp/terraform/helper/resource.(*StateChangeConf).WaitForState
2018-02-11T19:37:15.232+0100 [DEBUG] plugin.terraform-provider-digitalocean_v0.1.3_x4: /opt/teamcity-agent/work/222ea50a1b4f75f4/src/github.com/terraform-providers/terraform-provider-digitalocean/vendor/github.com/hashicorp/terraform/helper/resource/state.go:80 +0x1d0
2018/02/11 19:37:15 [TRACE] root: eval: *terraform.EvalWriteState
2018/02/11 19:37:15 [TRACE] root: eval: *terraform.EvalApplyProvisioners
2018/02/11 19:37:15 [TRACE] root: eval: *terraform.EvalIf
2018/02/11 19:37:15 [TRACE] root: eval: *terraform.EvalWriteState
2018/02/11 19:37:15 [TRACE] root: eval: *terraform.EvalWriteDiff
2018/02/11 19:37:15 [TRACE] root: eval: *terraform.EvalApplyPost
2018-02-11T19:37:15.235+0100 [DEBUG] plugin: plugin process exited: path=/Users/peter_v/pp/terraform-kubernetes/code/experiment_01_02_digital_ocean_droplet/.terraform/plugins/darwin_amd64/terraform-provider-digitalocean_v0.1.3_x4
2018/02/11 19:37:15 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:
* digitalocean_droplet.test: unexpected EOF
2018/02/11 19:37:15 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:
* digitalocean_droplet.test: unexpected EOF
2018/02/11 19:37:15 [TRACE] [walkApply] Exiting eval tree: digitalocean_droplet.test
2018/02/11 19:37:15 [TRACE] dag/walk: upstream errored, not walking "provider.digitalocean (close)"
2018/02/11 19:37:15 [TRACE] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
2018/02/11 19:37:15 [TRACE] dag/walk: upstream errored, not walking "root"
2018/02/11 19:37:15 [TRACE] Preserving existing state lineage "ff4375e0-a9d2-4b9b-beed-8de9f474e332"
2018/02/11 19:37:15 [TRACE] Preserving existing state lineage "ff4375e0-a9d2-4b9b-beed-8de9f474e332"
2018/02/11 19:37:15 [TRACE] Preserving existing state lineage "ff4375e0-a9d2-4b9b-beed-8de9f474e332"
2018/02/11 19:37:15 [TRACE] Preserving existing state lineage "ff4375e0-a9d2-4b9b-beed-8de9f474e332"
2018/02/11 19:37:15 [DEBUG] plugin: waiting for all plugin processes to complete...
2018-02-11T19:37:15.240+0100 [WARN ] plugin: error closing client during Kill: err="connection is shut down"
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.
When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.
[1]: https://github.com/hashicorp/terraform/issues
!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment