# juju_subnet (Resource)

A resource that represents assignment of a subnet to a Juju space.

## Example Usage

```terraform
resource "juju_model" "development" {
  name = "development"
}

resource "juju_space" "development" {
  model_uuid = juju_model.development.uuid
  name       = "development"
}

resource "juju_subnet" "development" {
  model_uuid = juju_model.development.uuid
  cidr       = "10.0.0.0/24"
  space_name = juju_space.development.name
}
```

<!-- schema generated by tfplugindocs -->

## Schema

### Required

- `cidr` (String) The subnet CIDR. Changing this value forces replacement.
- `model_uuid` (String) The UUID of the model where the subnet exists.
- `space_name` (String) The target space for this subnet.

### Read-Only

- `id` (String) The identifier of the subnet resource. Format: <model_uuid>:<cidr>

## Import

Import is supported using the following syntax:

The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

```shell
# Subnets can be imported using the format: model_uuid:cidr
$ terraform import juju_subnet.development a3c2c72a-75f6-43b9-9b2d-d85d5449cb2f:10.0.0.0/24
```
