terraform-provider-docker icon indicating copy to clipboard operation
terraform-provider-docker copied to clipboard

Support for getting swarm join token

Open innovate-invent opened this issue 2 years ago • 6 comments

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"
}

innovate-invent avatar Sep 28 '21 22:09 innovate-invent

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

innovate-invent avatar Sep 29 '21 01:09 innovate-invent

There appears to be some demand for this: https://stackoverflow.com/questions/44509997/capture-terraform-provisioner-output/44570343

innovate-invent avatar Sep 29 '21 18:09 innovate-invent

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.

github-actions[bot] avatar Dec 15 '21 10:12 github-actions[bot]

please re-open

innovate-invent avatar Dec 22 '21 19:12 innovate-invent

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.

github-actions[bot] avatar Feb 21 '22 10:02 github-actions[bot]

bump

innovate-invent avatar Feb 21 '22 10:02 innovate-invent