nomad_namespace

Provisions a namespace within a Nomad cluster.

Nomad auto-generates a default namespace called default. This namespace cannot be removed, so destroying a nomad_namespace resource where name = "default" will cause the namespace to be reset to its default configuration.

Example Usage

Registering a namespace:

resource "nomad_namespace" "dev" {
  name        = "dev"
  description = "Shared development environment."
  quota       = "dev"
  meta        = {
    owner = "John Doe"
    foo   = "bar"
  }
}

Registering a namespace with a quota:

resource "nomad_quota_specification" "web_team" {
  name        = "web-team"
  description = "web team quota"

  limits {
    region = "global"

    region_limit {
      cpu       = 1000
      memory_mb = 256
    }
  }
}

resource "nomad_namespace" "web" {
  name        = "web"
  description = "Web team production environment."
  quota       = nomad_quota_specification.web_team.name
}

Argument Reference

The following arguments are supported:

capabilities blocks

The capabilities block describes the capabilities of the namespace. It supports the following arguments:

node_pool_config blocks

The node_pool_config block describes the node pool configuration for the namespace.