Using Docker provider that depends on another
Is there a way for me to specify a provider that depends on another? I want to use Docker to provision a container once I spin up a VM on another provider. Like this:
Is there any way to do this? When I'm creating the template, Coder spits out:
Error: Error initializing Docker client: unable to parse docker host ''
6 Replies
Unfortunately no 😦 I do believe Terragrunt can do this though: https://terragrunt.gruntwork.io/
Terragrunt | Terraform wrapper
Terragrunt | Terraform wrapper
Terragrunt is a thin wrapper for Terraform that provides extra tools for keeping your Terraform configurations DRY, working with multiple Terraform modules, and managing remote state.
And we could probably add support for Terragrunt really easily. In fact, I'm pretty sure if you replaced your Terraform binary with Terragrunt (but still named it terraform), Coder would execute it normally.
Don't think it's a drop-in replacement,
template import provision for start: recv import provision: exit status 1
Run 'coder templates create --help' for usage.
yeah it's definitely not a drop-in replacement for terraform so we'd have to add support for this
feel free to create an issue with your usecase
Thanks, opened https://github.com/coder/coder/issues/4381
GitHub
Terragrunt support · Issue #4381 · coder/coder
One of my providers depends on a resource: provider "docker" { host = "tcp://${fly_machine.machine[0].privateip}:2375" } But this doesn't pass validation...