diff --git a/main.go b/main.go index c2f0b91..e35c920 100644 --- a/main.go +++ b/main.go @@ -220,11 +220,12 @@ func createTunnels(computerUsers map[string]string) []*os.Process { continue } ip := strings.TrimSpace(splitOutput[1]) + ip2 := strings.Trim(ip, "\"") computerName := strings.TrimSpace(splitOutput[0]) port := fmt.Sprintf("%d", *startPort) var host string if user, ok := computerUsers[computerName]; ok { - host = fmt.Sprintf("%s@%s", user, ip) + host = fmt.Sprintf("%s@%s", user, ip2) } fmt.Printf("creating tunnel to %s on %s\n", host, port) cmd := exec.Command("ssh", "-D", port, "-N", "-o", "StrictHostKeyChecking=no", "-i", *sshLocation, host) diff --git a/templates.go b/templates.go index a4cbb07..f1cf3b3 100644 --- a/templates.go +++ b/templates.go @@ -8,6 +8,14 @@ provider "digitalocean" { token = "${var.do_token}" } +terraform { + required_providers { + digitalocean = { + source = "digitalocean/digitalocean" + } + } +} + {{range .}} resource "digitalocean_droplet" "{{.Name}}" { image = "ubuntu-14-04-x64" @@ -146,7 +154,7 @@ data "aws_ami" "{{$name}}" { filter { name = "name" - values = ["amzn2-ami-hvm-2.0.2018*"] + values = ["amzn2-ami-hvm-2.0.2022*"] } filter {