aliksend / terraform-provider-dokku

Mozilla Public License 2.0
10 stars 3 forks source link

unable go get dokku version #70

Open hampfh opened 2 months ago

hampfh commented 2 months ago

Hi! I'm trying to understand why the dokku version isn't registered when I'm trying to run this terraform plugin. I have an empty server (with my key inserted as an authorized key, I've confirmed that I can ssh in manually). I've also already installed dokku on the system via a previous provisioner. When I run dokku version I get: dokku version 0.34.9

However when I try to run the dokku provider I get this error, it seems like it can't find the dokku version number but I don't understand why that would be the case? The server is using Ubuntu 22 if that helps.

Error:

│ Error: unable go get dokku version
│ 
│   with provider["registry.terraform.io/aliksend/dokku"],
│   on main.tf line 10, in provider "dokku":
│   10: provider "dokku" {
│ 
│ unable go get dokku version
terraform {
  required_providers {
    dokku = {
      source  = "aliksend/dokku"
      version = "1.0.18"
    }
  }
}

provider "dokku" {
  ssh_host         = var.docker_ipaddress_host
  log_ssh_commands = true

  ssh_user = "ubuntu"
  ssh_port = 22
  ssh_cert = file(var.ssh_private_key)
}
aliksend commented 5 days ago

Hi. Sorry, missed your message.

If the problem is still not resolved, I see issue in your setup: you need to specify "dokku" user in ssh_user variable. So you can run dokku commands without calling the dokku binary. For example, if you connect to dokku@yourserver, you can run "version" (not "dokku version") and get "dokku version 0.34.9".