juju_subnet (Resource)

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

Example Usage

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

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>:

Import

Import is supported using the following syntax:

# 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