You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.
# module.docker_reverse_proxy_setup.docker_container.reverse_proxy will be created
+ resource "docker_container" "reverse_proxy" {
[...](omitted)
+ volumes {
+ container_path = "/etc/nginx/conf.d"
+ host_path = "C:/absolute/root/path/"
+ read_only = true
}
}
Actual Behavior
Error: "volumes.0.host_path" must be an absolute path
on modules\docker-nginx\resources.tf line 7, in resource "docker_container" "reverse_proxy":
7: resource "docker_container" "reverse_proxy" {
Steps to Reproduce
terraform apply
Important Factoids
On windows:
host_path = "G:\\ABC" # --> absolute path
host_path = "/G/ABC" # --> absolute path
host_path = abspath(path.root) # --> not an absolute path
host_path = path.root # --> not an absolute path
host_path = G:/ABC # --> not an absolute path
abspath(path.root) returns C:/path/to/root which is an absolute path on Windows and Terraform but not for the docker_container resource.
Am I missing something or is this a bug?
I try to write terraform code which should run both on Windows and Linux.
But I fail to handle absolute paths on Windows correctly.
Terraform Version
v0.12.28 on Windows 10 Pro Build 18363
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
What should have happened?
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
On windows:
abspath(path.root)
returnsC:/path/to/root
which is an absolute path on Windows and Terraform but not for the docker_container resource.Am I missing something or is this a bug?
I try to write terraform code which should run both on Windows and Linux.
But I fail to handle absolute paths on Windows correctly.
References
The text was updated successfully, but these errors were encountered: