terraform {
  required_version = "~> 1.3.5"

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

locals {
  host      = "hash.trygvis.io"
  public_ip = "138.201.33.16"

  hs         = module.ipam6.hosts
  ns         = module.ipam6.networks
  dn42_range = local.ns.hash_docker_dn42.range
}

provider "docker" {
  host = "ssh://${local.host}"
}

data "sops_file_entry" "linode_token" {
  source_file = "../../sops.yml"
  data_key    = "linode_token"
}

module "ipam6" {
  source = "../ipam6"
}