-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker_container volumes host_path ignored #87
Comments
This issue is stale because it has been open 60 days with no activity. |
This issue is stale because it has been open 60 days with no activity. |
In case anyone runs into this issue, as a work-around, it seems that removing This issue could be fixed by disallowing both |
Following this approach solved this for me. |
I read the official docker docs and looked into the provider codebase and found out what the problem is.
To separate this "union" type in this provider, two values got introduced: The code actually is: volumeName := volume["volume_name"].(string)
if len(volumeName) == 0 {
volumeName = volume["host_path"].(string)
} which leads to the case, that as soon as the How to fix:
I don't like option 2, and I think option 1 & 3 migh be breaking changes which would first need a warning with a new minor version and then the change with the major version. Any opinions of the people affected by this bug? |
I would prefer option 1 with a link to docs that describe you can not use both of them at the same time. |
This issue was originally opened by @schlitzered as hashicorp/terraform-provider-docker#139. It was migrated here as a result of the community provider takeover from @kreuzwerker. The original body of the issue is below.
Terraform Version
Terraform v0.11.13
Affected Resource(s)
docker_container
Terraform Configuration Files
Expected Behavior
container should have /Users/MyUser/tmp/docker_fdsafx/terraform/blarg/ mounted
Actual Behavior
container has /var/lib/docker/volumes/www_fdsafx_test/_data mounted
Steps to Reproduce
terraform apply
Important Factoids
running on MacOS useing Docker Desktop
from docker inspect:
The text was updated successfully, but these errors were encountered: