Skip to content
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 provider with tls support #10754

Closed
dodwmd opened this issue Dec 15, 2016 · 6 comments · Fixed by #10801
Closed

docker provider with tls support #10754

dodwmd opened this issue Dec 15, 2016 · 6 comments · Fixed by #10801

Comments

@dodwmd
Copy link

dodwmd commented Dec 15, 2016

Trying to run against a docker server that has tls/certs setup with 0.8.0 and 0.8.1 doesn't work. Works fine in 0.7.13.

Terraform Version

$ ./terraform_0.8.1 version
Terraform v0.8.1

Affected Resource(s)

docker provider with tls support

Terraform Configuration Files

provider "docker" {
  cert_path = "./certs/"
  host = "tcp://docker.local:2376/"
}

Steps to Reproduce

Dteps required to reproduce the issue:

$ mkdir certs
Put ca.pem, cert.pem key.pem in certs dir.
$ echo > provider.tf << EOF
provider "docker" {
cert_path = "./certs/"
host = "tcp://test.local:1234/"
}
$ ./terraform_0.8.1 apply
There are warnings and/or errors related to your configuration. Please
fix these before continuing.

Errors:

  • provider.docker: "ca_material": conflicts with cert_path ("./certs/")
  • provider.docker: "cert_material": conflicts with cert_path ("./certs/")
  • provider.docker: "key_material": conflicts with cert_path ("./certs/")
@hmcgonig
Copy link
Contributor

I can confirm that I'm seeing this as well. Seems to be happening since the addition of #10151.

@mkuzmin
Copy link
Contributor

mkuzmin commented Dec 16, 2016

I'm looking into this.

As a quick workaround you can switch to the new schema:

provider "docker" {
  cert_material = "${file("certs/cert.pem")}"
  key_material = "${file("certs/key.pem")}"
  ca_material = "${file("certs/ca.pem")}"
}

But that's definitely a bug, and I will fix it ASAP.

@dodwmd
Copy link
Author

dodwmd commented Dec 16, 2016

Confirmed that workaround works.

@gregzuro
Copy link

Looks like 7a59971 broke the workaround?

@mkuzmin
Copy link
Contributor

mkuzmin commented Jan 17, 2017

Both options should work correctly now. If you experience problems, please open a separate issue, and provide details.

Thanks

@ghost
Copy link

ghost commented Apr 18, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants