Comments (9)
From #101, the proposal:
provider "docker" {
host = "ssh://user@remote-host:22"
private_key = file(var.my_key_path)
}
I believe it is possible to use terraform builtins for the connection as the null_resource
provider allows for a connection.private_key
field. There may be other providers that use this pattern, but this is the only example I have offhand.
from terraform-provider-docker.
Let's see if we make that with #119
from terraform-provider-docker.
feel free to file a PR :) unfortunately we're busy with the refactorings and release this feature as well then
from terraform-provider-docker.
Hello.
Same issue here. Please add possibility to add private key, passphrase.
from terraform-provider-docker.
Looks like something about this line needs updating.
terraform-provider-docker/docker/config.go
Line 120 in 8da701d
The updated function to enable this appears to have been made here:
https://github.com/docker/cli/blob/d26bdfd4ea235a4e94c5fc907215b197280f80c0/cli/connhelper/connhelper.go#L33
from terraform-provider-docker.
too much effort to try making it work. The Docker provider needs more work. Refer to #80
In my case i was trying to make it work from terraform cloud. It was a pain. Refer to https://discuss.hashicorp.com/t/docker-provider-in-terraform-cloud-error-failed-to-query-available-provider-packages/21148
I will use a combination of
- user_data.tpl in my terraform cloud workspace that installs latest docker-compose version up to now 2021-02-22
COMPOSE_VERSION="1.28.4"
sudo curl -L "https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
-
a docker-compose file embedded in a terraform string variable. See https://gist.github.com/jamesmishra/18ee5d7d053db9958d0e4ccbb37f8e1d
-
finally pray that all of this works and I can restore a PostgreSQL dump from 9.3.3 to RDS PostgreSQL 9.6
from terraform-provider-docker.
This issue is stale because it has been open 60 days with no activity.
Remove stale
label or comment or this will be closed in 7 days.
If you don't want this issue to be closed, please set the label pinned
.
from terraform-provider-docker.
how could we work together to implement this?
from terraform-provider-docker.
I believe it is possible to use terraform builtins for the connection as the
null_resource
provider allows for aconnection.private_key
field. There may be other providers that use this pattern, but this is the only example I have offhand.
As far as my knowledge of Terraform goes the connection directive is only for provisioners, not for resources:
https://www.terraform.io/docs/language/resources/provisioners/connection.html
Another reference:
https://github.com/hashicorp/terraform-plugin-sdk/blob/112e2164c381d80e8ada3170dac9a8a5db01079a/terraform/state.go#L1592
Look at the comment: "ConnInfo is used for the providers to export information which is used to connect to the resource for provisioning".
So it's not a pattern for providers, it's a built-in directive for provisioners.
from terraform-provider-docker.
Related Issues (20)
- docker_container devices forces resource replacement at all times HOT 11
- Support for detachable containers
- Conditionally rebuild image
- feat: Add support for additional docker_image build contexts
- Flaky `Error response from daemon: Conflict, cannot remove the default link name of the container` on `terraform destroy`
- Support for VolumeOptions.Subpath in docker_container.mounts.volume_options HOT 1
- Support for Docker Cluster Volumes HOT 1
- Error during pushing image to GCP Artifact Registry, Unable to create image, image not found: unable to get digest: Got bad response from registry: 405 Method Not Allowed HOT 1
- Error when pushing ECR public registry: `unable to get digest: Got bad response from registry: 400 Bad Request` HOT 2
- Support for error message when service didn't converge
- Docker image trigger is not working
- Using a file for storing environment variables
- Support for `triggers` or `run_when_changed` or something like it on `docker_container` or a new `docker_container_ephemeral` resource
- Support `extra_hosts`, `secrets` attribute for `docker_container` resource
- Support for using Data Sources without access to a Docker Daemon HOT 1
- DOCKER_CONFIG is incompatible w/ docker CLI variable of same name
- Support for platform emulation in docker_container HOT 1
- Allow provider override for SSH HOT 1
- "One-shot tasks" via `docker_container` fail with "Error: No such container: xxx"
- kreuzwerker/docker ignores locally installed CA certificates, passing them explicitly won't help either HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-docker.