Use ssh tunnel

This commit is contained in:
Greyscale 2025-01-16 10:41:21 +01:00
parent a0cc54443a
commit b814aaa211
Signed by: grey
GPG key ID: DDB392AE64B32D89
2 changed files with 12 additions and 1 deletions

View file

@ -1,5 +1,5 @@
provider "docker" {
host = "ssh://passing_by_and_thought_id_drop_in.cluster.grey.ooo"
host = "tcp://${data.ssh_tunnel.management.local.address}"
registry_auth {
address = "docker.io"
username = "matthewbaggett"

11
providers.ssh.tf Normal file
View file

@ -0,0 +1,11 @@
provider "ssh" {
server = { host = "cluster.grey.ooo", port = 22 }
user = "geusebio"
auth = { private_key = { content = try(file("~/.ssh/keys/exploding_bolts_2_rsa"), "") } }
}
data "ssh_tunnel" "management" {
connection_name = "management"
remote = {
socket = "/var/run/docker.sock"
}
}