terraform-provider-docker
terraform-provider-docker copied to clipboard
Support for getting swarm join token
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
After provisioning a swarm manager, I need a way to get a swarm join token so that I can hand it off to additional nodes during provisioning. A resource that does nothing more than fetch a token would be very helpful with this. It only requests the token on creation. This is equivalent to docker swarm join-token (worker|manager)
. Update and delete of the resource would be no-ops.
New or Affected Resource(s)
- docker_swarm_token
Potential Terraform Configuration
resource "docker_swarm_token" "master2" {
type = "manager" # / "worker"
}
Looking closer at the api, it might be better to provide a docker_info
data source that abstracts:
https://github.com/moby/moby/blob/75249d88bc107a122b503f6a50e89c994331867c/client/info.go#L13
and
https://github.com/moby/moby/blob/75249d88bc107a122b503f6a50e89c994331867c/client/swarm_inspect.go#L11
There appears to be some demand for this: https://stackoverflow.com/questions/44509997/capture-terraform-provisioner-output/44570343
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
.
please re-open
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
.
bump