hashicorp / terraform-provider-docker

As part of our introduction to self-service publishing in the Terraform Registry, this copy of the provider has been archived, and ownership has been transferred to active maintainers in the community. Please see the new location on the Terraform Registry: https://registry.terraform.io/providers/kreuzwerker/docker/latest
https://registry.terraform.io/providers/kreuzwerker/docker/latest
Mozilla Public License 2.0
132 stars 92 forks source link

Swarm Secret Data Source #302

Open taiidani opened 4 years ago

taiidani commented 4 years ago

Terraform Version

0.12.29

Affected Resource(s)

New resource request, for a docker_secret data source

Expected Behavior

My team uses an external automation to load Secrets into our Swarm. However, we're also trying to use the docker_service resource. That resource requires the secret_id which is an output of the docker_secret resource...but that resource does not support importing.

Expected behavior of the provider would be a docker_secret data source to match the docker_secret resource. The data source would be able to take the name of the secret and output its id.

Actual Behavior

We have to either not use Secrets in our Swarm when using this provider, or manually look up and then hardcode their ids into our docker_service definitions.

Steps to Reproduce

Attempt to define a docker_service resource that uses a secret that was not created by a docker_secret resource.

Important Factoids

I'd be happy to give a PR a shot if there is an interest from the maintainers!