Closed suzuki-shunsuke closed 4 years ago
The panic is solved, but I found the other problem.
The container is recreated due to the change of env
.
https://github.com/terraform-providers/terraform-provider-docker/issues/264#issuecomment-640154237
$ terraform apply
$ vi main.tf # upgrade docker provider from 2.6.0 to 2.7.0 or 2.7.1
$ terraform init
$ terraform plan
...
env.#: "" => <computed> (forces new resource)
...
If we remove the Computed: true
from env
, this problem is solved.
But I don't know whether we should remove Computed: true
from env
or not.
In my understanding, by #269 we stop to import env
to State so we can remove Computed: true
from env
.
Closes #264
=> https://github.com/terraform-providers/terraform-provider-docker/issues/264#issuecomment-640154237
If "mounts" isn't set in Terraform Configuration with Docker provider v2.6.0, "mounts" isn't set in State. So
rawState
doesn't have the key "mounts" andrawState["mounts"].([]interface{})
occurs panic.