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 Container List data source #642

Open
KetchupBomb opened this issue Aug 24, 2024 · 0 comments
Open

Docker Container List data source #642

KetchupBomb opened this issue Aug 24, 2024 · 0 comments

Comments

@KetchupBomb
Copy link

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

Looking for a data source for listing containers. Specifically, the /containers Docker Engine API endpoint.

New or Affected Resource(s)

  • New data docker_containers

Potential Terraform Configuration

data "docker_containers" "this" {}
ouput "container_fingerprint" {
  description = "Toy example mapping Container IDs to an md5sum fingerprint of its configuration"
  value       = { for c in data.docker_containers.this : c.ID => md5(jsonencode(c)) }
}

References

Thanks for this Provider!

I couldn't find any issues that seemed to match the need for listing containers for enumeration, which I'm surprised by. Sorry if I missed a relevant existing issue.

I am a Golang noob, and I've never written a Terraform Provider before, but this might be a good place for me to cut my teeth. Wanted to flag it for consideration to see if this has already been discussed as a Won't Do or something.

Thanks for your consideration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant