This commit is contained in:
Greyscale 2024-07-04 01:10:04 +02:00
parent 5d77766197
commit 5863de84aa
4 changed files with 25 additions and 30 deletions

View file

@ -1,33 +1,28 @@
/*provider "ssh" {
server = {
host = "california.ti"
port = 22
}
user = "techinc"
auth = {
private_key = {
content = file("~/.ssh/keys/exploding_bolts_2_rsa")
}
}
}
data "ssh_tunnel" "docker" {
connection_name = "docker_socket_tunnel_california"
remote = {
socket = "/var/run/docker.sock"
}
}
*/
provider "docker" { provider "docker" {
host = "ssh://california.ti" host = "ssh://california.ti"
registry_auth {
address = "docker.io"
username = "matthewbaggett"
password = "dckr_pat_6ytcZqdfqRXzFYe5GUh79RfH1Hw"
}
} }
provider "docker" { provider "docker" {
alias = "printi" alias = "printi"
host = "ssh://prin.ti" host = "ssh://prin.ti"
registry_auth {
address = "docker.io"
username = "matthewbaggett"
password = "dckr_pat_6ytcZqdfqRXzFYe5GUh79RfH1Hw"
}
} }
provider "docker" { provider "docker" {
alias = "unifi" alias = "unifi"
host = "ssh://unifi.ti" host = "ssh://unifi.ti"
registry_auth {
address = "docker.io"
username = "matthewbaggett"
password = "dckr_pat_6ytcZqdfqRXzFYe5GUh79RfH1Hw"
}
} }

View file

@ -22,7 +22,7 @@ resource "docker_service" "video_bucket" {
} }
} }
} }
locals{ locals {
video_bucket_config = <<EOF video_bucket_config = <<EOF
S3_ENDPOINT=http://s3.california.ti S3_ENDPOINT=http://s3.california.ti
S3_BUCKET=video S3_BUCKET=video
@ -31,7 +31,7 @@ S3_SECRET=E4xMwB44MT4tGLStJnZTwQbuDNHL1KR9M4I8taBT
EOF EOF
} }
resource "docker_config" "video_bucket_config" { resource "docker_config" "video_bucket_config" {
name = "video_bucket_config_${substr(md5(local.video_bucket_config),0,7)}" name = "video_bucket_config_${substr(md5(local.video_bucket_config), 0, 7)}"
data = base64encode(local.video_bucket_config) data = base64encode(local.video_bucket_config)
} }
module "videobucket_nginx_config" { module "videobucket_nginx_config" {