Skip to content

frostmoln_subnet (Resource) ​

Manages a subnet in the Frostmoln Cloud Platform.

Authoritative scope — who owns what on this resource, declared in internal/scopedecl and machine-checked against the schema.

Enacted and reconciled — every configurable attribute not listed below: the platform applies it, and a refresh reads the truth back.

Create-immutable — cidr, dns_servers, gateway_ip, vpc_id: the network service has no in-place update for it — a change destroys and re-creates the subnet.

Create-immutable — zone: the platform pins the zone at create; there is no in-place migration between zones.

Observed, not enacted — tags_all: keys set outside Terraform — in the portal, by the fm CLI, or stamped by the platform — appear only here and are kept on every apply, never removed.

Example Usage ​

terraform
resource "frostmoln_subnet" "example" {
  name        = "web-subnet"
  description = "Web tier subnet"
  cidr        = "10.0.1.0/24"
  vpc_id      = frostmoln_vpc.example.id
  zone        = "falkenberg"
  gateway_ip  = "10.0.1.1"

  # dns_servers is optional — omit it to use the platform resolvers. It is
  # ForceNew, so correcting a wrong value later recreates the subnet.

  tags = {
    tier = "web"
  }
}

Schema ​

Required ​

  • cidr (String) The CIDR block for the subnet.
  • name (String) The name of the subnet.
  • vpc_id (String) The ID of the VPC this subnet belongs to.

Optional ​

  • description (String) A description of the subnet.
  • dns_servers (List of String) The DNS server addresses for the subnet. Defaults to the platform DNS servers.
  • gateway_ip (String) The gateway IP address for the subnet.
  • tags (Map of String) Tags for the subnet. Merged with the provider's default_tags on every write (a key set here wins). Holds only the keys this configuration sets; the full set is in tags_all.
  • timeouts (Block, Optional) (see below for nested schema)
  • zone (String) The availability zone for the subnet.

Read-Only ​

  • available_ips (Number) The number of available IP addresses in the subnet.
  • created_at (String) The creation timestamp.
  • id (String) The unique identifier of the subnet.
  • status (String) The status of the subnet.
  • tags_all (Map of String) Every tag the platform holds on this resource: the provider's default_tags, this resource's own tags (which win on a shared key), and any key set outside Terraform — in the portal, by the fm CLI, or stamped by the platform. Keys set outside Terraform appear only here and are kept on every apply, never removed.

Nested Schema for timeouts ​

Optional:

  • create (String) How long the provider waits for the create operation to converge before giving up (e.g. "45m", "2h").
  • delete (String) How long the provider waits for the delete to complete before giving up (e.g. "30m").
  • update (String) How long the provider waits for an update (resize, in-place change) to converge before giving up (e.g. "30m").