frostmoln_subnet (Data Source)
Look up a subnet by ID or name, optionally filtered by VPC.
Example Usage
terraform
data "frostmoln_subnet" "web" {
name = "web-subnet"
vpc_id = data.frostmoln_vpc.production.id
}
output "subnet_cidr" {
value = data.frostmoln_subnet.web.cidr
}Schema
Optional
id(String) The unique identifier of the subnet. At least one of id or name must be specified.name(String) The name of the subnet. At least one of id or name must be specified.vpc_id(String) Filter subnets by VPC ID. Used when looking up by name.
Read-Only
available_ips(Number) The number of available IP addresses in the subnet.cidr(String) The CIDR block of the subnet.created_at(String) The timestamp when the subnet was created.description(String) The description of the subnet.gateway_ip(String) The gateway IP address of the subnet.status(String) The status of the subnet.tags(Map of String) The tags associated with the subnet.zone(String) The availability zone of the subnet.