A Terraform provider for managing Docker containers, images, networks, volumes, and services as infrastructure.
Terraform Provider for Docker is an open-source plugin that extends HashiCorp Terraform to manage Docker resources. It allows users to define Docker containers, images, networks, volumes, and services using Terraform's configuration language, enabling infrastructure-as-code practices for containerized environments. This provider bridges Docker's container runtime with Terraform's provisioning and state management capabilities.
DevOps engineers, platform teams, and developers who use Terraform for infrastructure automation and want to incorporate Docker container management into their existing workflows.
It provides a declarative, version-controlled approach to Docker management, integrating seamlessly with Terraform's ecosystem for multi-cloud and hybrid infrastructure. Unlike imperative Docker CLI scripts, it offers state tracking, plan/preview functionality, and consistent resource lifecycle management.
Terraform Docker provider
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables defining Docker resources in Terraform HCL with plan/preview functionality and automated drift detection, as highlighted in the key features for consistent deployments.
Integrates Docker management with existing Terraform workflows, allowing multi-cloud infrastructure provisioning, per the value proposition of treating Docker as part of broader IaC.
Supports version pinning for both provider and Docker images, with state tracking for reproducibility across environments, demonstrated in the example usage with keep_locally and image_id.
Includes resources for deploying and scaling Docker Swarm services with replicas and rolling updates, a specific strength for Swarm users over basic container management.
Migration guides from v2 to v3 and v3 to v4 indicate that updates often introduce breaking changes, requiring manual migration efforts and potential disruption.
Requires at least Terraform 1.1.5 and familiarity with its ecosystem, adding complexity for teams solely focused on Docker without prior IaC experience.
Does not support alternative container runtimes like Podman or orchestration systems like Kubernetes, restricting use in diverse or modern container environments.