sacloud / terraform-provider-sakuracloud

Terraform provider for SakuraCloud
https://docs.usacloud.jp/terraform
Apache License 2.0
71 stars 23 forks source link

サーバーの追加NIC定義を削除するとpanic発生 #105

Closed yamamoto-febc closed 7 years ago

yamamoto-febc commented 7 years ago

概要

サーバーの追加NICの定義を削除するとpanic発生

再現する最小手順

以下それぞれでterraform applyを実施

before

resource sakuracloud_server "foobar" {
    name = "foobar"
    additional_interfaces = [""]
}

after

resource sakuracloud_server "foobar" {
    name = "foobar"
}

期待する値

terraform applyが正常終了すること

実際の値

以下のログが出力される

`terraform apply`時のログ ``` panic: empty structure "additional_interfaces." has entry "additional_interfaces.0" goroutine 29 [running]: github.com/hashicorp/terraform/terraform.(*InstanceState).MergeDiff(0xc42036f400, 0xc4204052e0, 0x0) /private/tmp/terraform-20170331-56057-7aethk/terraform-0.9.2/src/github.com/hashicorp/terraform/terraform/state.go:1713 +0x5a8 github.com/hashicorp/terraform/terraform.(*EvalDiff).Eval(0xc4201cf770, 0x80b86c0, 0xc420154000, 0x2, 0x2, 0x58acfee, 0x4) /private/tmp/terraform-20170331-56057-7aethk/terraform-0.9.2/src/github.com/hashicorp/terraform/terraform/eval_diff.go:177 +0x481 github.com/hashicorp/terraform/terraform.EvalRaw(0x8085e80, 0xc4201cf770, 0x80b86c0, 0xc420154000, 0x550ac60, 0xc42036f400, 0x0, 0x0) /private/tmp/terraform-20170331-56057-7aethk/terraform-0.9.2/src/github.com/hashicorp/terraform/terraform/eval.go:53 +0x175 github.com/hashicorp/terraform/terraform.(*EvalSequence).Eval(0xc42042c980, 0x80b86c0, 0xc420154000, 0x2, 0x2, 0x58acfee, 0x4) /private/tmp/terraform-20170331-56057-7aethk/terraform-0.9.2/src/github.com/hashicorp/terraform/terraform/eval_sequence.go:14 +0xc1 github.com/hashicorp/terraform/terraform.EvalRaw(0x8086440, 0xc42042c980, 0x80b86c0, 0xc420154000, 0x4f25880, 0xc42043ac2c, 0x4c9a8a0, 0xc42043ad40) /private/tmp/terraform-20170331-56057-7aethk/terraform-0.9.2/src/github.com/hashicorp/terraform/terraform/eval.go:53 +0x175 github.com/hashicorp/terraform/terraform.Eval(0x8086440, 0xc42042c980, 0x80b86c0, 0xc420154000, 0xc42042c980, 0x8086440, 0xc42042c980, 0xc4204ba680) /private/tmp/terraform-20170331-56057-7aethk/terraform-0.9.2/src/github.com/hashicorp/terraform/terraform/eval.go:34 +0x4d github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x56ea5a0, 0xc4201ca2b0, 0x0, 0x0) /private/tmp/terraform-20170331-56057-7aethk/terraform-0.9.2/src/github.com/hashicorp/terraform/terraform/graph.go:126 +0xd4d github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc4203331f0, 0x56ea5a0, 0xc4201ca2b0, 0xc420100800) /private/tmp/terraform-20170331-56057-7aethk/terraform-0.9.2/src/github.com/hashicorp/terraform/dag/walk.go:387 +0x392 created by github.com/hashicorp/terraform/dag.(*Walker).Update /private/tmp/terraform-20170331-56057-7aethk/terraform-0.9.2/src/github.com/hashicorp/terraform/dag/walk.go:310 +0x9ca !!!!!!!!!!!!!!!!!!!!!!!!!!! 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 !!!!!!!!!!!!!!!!!!!!!!!!!!!! ```
yamamoto-febc commented 7 years ago

Terraform v0.9.4 + Terraform for さくらのクラウド v0.9.0の組み合わせで再現しなくなったことを確認。 再発するようであれば再オープンする。