## nomad (platform)

Deploy to a nomad cluster as a service using docker.

### Interface

### Examples

```hcl
deploy {
        use "nomad" {
          region = "global"
          datacenter = "dc1"
          auth {
            username = "username"
            password = "password"
          }
          static_environment = {
            "environment": "production",
            "LOG_LEVEL": "debug"
          }
          service_port = 3000
          replicas = 1
        }
}
```

### Required Parameters

These parameters are used in the [`use` stanza](/docs/waypoint-hcl/use) for this plugin.

#### auth

The credentials for docker registry.

- Type: **nomad.AuthConfig**

#### consul_token

The Consul ACL token used to register services with the Nomad job.

Uses the runner config environment variable CONSUL_HTTP_TOKEN.

- Environment Variable: **CONSUL_HTTP_TOKEN**

#### vault_token

The Vault token used to deploy the Nomad job with a token having specific Vault policies attached.

Uses the runner config environment variable VAULT_TOKEN.

- Environment Variable: **VAULT_TOKEN**

### Optional Parameters

These parameters are used in the [`use` stanza](/docs/waypoint-hcl/use) for this plugin.

#### datacenter

The Nomad datacenter to deploy the job to.

- Type: **string**
- **Optional**
- Default: dc1

#### namespace

The Nomad namespace to deploy the job to.

- Type: **string**
- **Optional**

#### region

The Nomad region to deploy the job to.

- Type: **string**
- **Optional**
- Default: global

#### replicas

The replica count for the job.

- Type: **int**
- **Optional**
- Default: 1

#### resources (category)

The amount of resources to allocate to the deployed allocation.

##### resources.cpu

Amount of CPU in MHz to allocate to this task.

- Type: **int**
- **Optional**
- Default: 100

##### resources.memorymb

Amount of memory in MB to allocate to this task.

- Type: **int**
- **Optional**
- Default: 300

#### service_port

TCP port the job is listening on.

- Type: **uint**
- **Optional**

#### service_provider

Specifies the service registration provider to use for registering a service for the job.

- Type: **string**
- **Optional**
- Default: consul

#### static_environment

Environment variables to add to the job.

- Type: **map of string to string**
- **Optional**

### Output Attributes

Output attributes can be used in your `waypoint.hcl` as [variables](/docs/waypoint-hcl/variables) via [`artifact`](/docs/waypoint-hcl/variables/artifact) or [`deploy`](/docs/waypoint-hcl/variables/deploy).

#### id

- Type: **string**

#### name

- Type: **string**

#### resource_state

- Type: **opaqueany.Any**
