resource "scaleway_container_namespace" "miniauth" {
  name        = "miniauth"
  description = "Miniauth for gutes team"
  project_id  = "d7b7ab2d-478c-44af-9f66-f90af976a779"
}


resource "scaleway_container" "main" {
  name           = "miniauth-webgui"
  description    = "The webpage for the user authentification"
  namespace_id   = scaleway_container_namespace.miniauth.id
  registry_image = "git.keks.cloud/kekskurse/miniauth:latest"
  port           = 8080
  cpu_limit      = 100
  memory_limit   = 128
  min_scale      = 0
  max_scale      = 1
  timeout        = 600
  privacy        = "public"
  protocol       = "http1"
  deploy         = true
  http_option    = "redirected"

  environment_variables = {
    "foo" = "var"
  }
  secret_environment_variables = {
    "key" = "secret"
  }
}
