terraform {
  required_version = "~> 1.3.5"

  required_providers {
    docker = {
      source  = "kreuzwerker/docker"
      version = "2.24.0"
    }
    sops = {
      source  = "lokkersp/sops"
      version = "0.6.10"
    }
  }
}

provider "docker" {
  host = "ssh://conflatorio.vpn.trygvis.io"
}

resource "docker_image" "redis" {
  name = "redis:5.0.9"
}

resource "docker_image" "server" {
  name = "bazelbuild/buildfarm-server:v2.6.1"
}

resource "docker_image" "worker" {
  name = "bazelbuild/buildfarm-worker:v2.6.1"
}

resource "docker_network" "buildfarm" {
  name = "buildfarm"
}

data "docker_network" "traefik" {
  name = "traefik"
}