Open ghost opened 4 years ago
https://www.terraform.io/docs/providers/docker/r/container.html#image
image - (Required, string) The ID of the image to back this container. The easiest way to get this value is to use the docker_image resource as is shown in the example above.
image
should be not registry.gitlab.com/greenmns/test
but image ID of registry.gitlab.com/greenmns/test
.
I'm not sure the image information is related, but I confirm I'm having a similar issue with terraform destroy
if the docker_container
flag rm = true
is set.
See also issue https://github.com/terraform-providers/terraform-provider-docker/issues/163
This issue was originally opened by @greenmns as hashicorp/terraform#25552. It was migrated here as a result of the provider split. The original body of the issue is below.
I have a terrafom file with name main.tf that resource is only docker_container my terraform version is
Terraform v0.12.28
main.tf file is:
image registry.gitlab.com/greenmns/test is locally in my computer.
when i run
terraform apply
to generate a container i saw withdocker ps
my container is up but when i runterraform destroy
container test is run and it didn't destory I think this is a buge of terraform