<a id="placement-directive"></a>

# Placement directive

In Juju, a **placement directive** is an option based on the `--to` flag that can be passed to certain commands to specify a deploy location, where the commands include [juju add-machine](https://documentation.ubuntu.com/juju/3.6/reference/juju-cli/list-of-juju-cli-commands/add-machine.md#command-juju-add-machine) ,  [juju add-unit](https://documentation.ubuntu.com/juju/3.6/reference/juju-cli/list-of-juju-cli-commands/add-unit.md#command-juju-add-unit),  [juju bootstrap](https://documentation.ubuntu.com/juju/3.6/reference/juju-cli/list-of-juju-cli-commands/bootstrap.md#command-juju-bootstrap),  [juju deploy](https://documentation.ubuntu.com/juju/3.6/reference/juju-cli/list-of-juju-cli-commands/deploy.md#command-juju-deploy),  [juju enable-ha](https://documentation.ubuntu.com/juju/3.6/reference/juju-cli/list-of-juju-cli-commands/enable-ha.md#command-juju-enable-ha), and the location is  (1) an existing or a new machine or (2) a key-value pair specifying a subnet, system ID, or an availability zone.

Example: `juju add-machine --to 1`, `juju deploy --to zone=us-east-1a`

The rest of this document gives details about the locations.

#### CAUTION
When the location is a key-value pair, its availability and meaning may vary from cloud to cloud. For details see [List of supported clouds](https://documentation.ubuntu.com/juju/3.6/reference/cloud/list-of-supported-clouds.md#list-of-supported-clouds) > `<cloud name>`.

## List of placement directive locations

<a id="placement-directive-machine"></a>

### `<machine>`

Depending on whether this is an existing machine or a new machine, this will be:

- The existing machine ID.

**Examples:** `1` (existing machine `1`),  `5/lxd/0` (existing container `0` on machine `5`)

- A new machine, specifying a type or relative location.

**Examples:** `lxd` (new container on a new machine), `lxd:5` (new container on machine 5)

See more: [Machine designations](https://documentation.ubuntu.com/juju/3.6/reference/machine.md#machine-designations)

<a id="placement-directive-subnet"></a>

### `subnet=<subnet>`

Available for Azure and AWS EC2.

<a id="placement-directive-system-id"></a>

### `system-id=<system ID>`

Available for MAAS.

<a id="placement-directive-zone"></a>

### `zone=<zone>`

**Purpose:** To specify an availability zone.

#### IMPORTANT
The `zone` placement directive may be used to override a `zones` [constraint](https://documentation.ubuntu.com/juju/3.6/reference/constraint.md#constraint).

**Example:** `zone=us-east-1a`
