3 ms·
I have found Terraform to be a great way to manage Docker Swarm. I use one Terraform project to provision VPC, EC2, security groups, and install Docker with TLS
by shred45 7y ago
I have found Terraform to be a great way to manage Docker Swarm. I use one Terraform project to provision VPC, EC2, security groups, and install Docker with TLS authentication set up. I then use a second Terraform project to manage Docker resources on these servers. The Docker provider is definitely not perfect, but it allows me to easily manage hundreds of configs, secrets, and services on several clusters. I think this is a great pseudo-Kubernetes solution that is more tractable for smaller shops.
I think this solution is much more maintainable than things like Helm or Docker Stacks, with easy inspection of desired resources, configurations, and Terraform 12's nice new diffs when applying. I definitely think if my needs graduate to Kubernetes, I would explore the Terraform route here as well. In general I think Terraform is really poorly designed and incomplete, but that it is also a rough first iteration on what is the future of DevOps and large-scale resource management.