phpipam.subnets.ensure
Create a subnet in phpIPAM if it does not exist, using CIDR and section ID. Ensures the network is available for IP address management.
Instructions
Ensure a subnet exists (create if missing). Requires PHPIPAM_WRITE_ENABLED=true and PHPIPAM_ALLOW_SUBNET_CREATE=true
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cidr | Yes | Subnet in CIDR notation (e.g., 192.168.1.0/24) | |
| vlanId | No | VLAN ID | |
| sectionId | Yes | Section ID | |
| description | No | Subnet description | |
| masterSubnetId | No | Parent subnet ID (for nested subnets) |