provision_host
Create a new network host in one step: allocate an IP, add an IPAM host record, and optionally generate DNS A/PTR records. Supports dry-run preview and auto-assigned IPs.
Instructions
Provision a complete host in one step: creates IPAM host + IP + optional DNS A/PTR records. USE THIS when adding a new host to the network. For DNS-only changes use provision_dns(). To remove a host use decommission_host().
IMPORTANT: Runs in dry_run mode by default — shows what WOULD be created without actually creating. Set dry_run=False to execute the actual provisioning.
IMPORTANT: When a zone is provided, ASK the user whether they want auto_dns=True (recommended, lets the API create DNS records atomically with the host) or auto_dns=False (creates DNS A/PTR records as separate steps after host creation, giving more control but less atomicity).
Args: hostname: Host name (e.g., "web-prod-01"). If zone is provided, will be used as FQDN: hostname.zone space: IP space name or ID where the host should be created (e.g., "prod", "corp", or full resource ID) ip: Optional specific IP address. If not provided, auto-assigns the next available IP from the subnet. zone: Optional DNS zone name for creating A/PTR records (e.g., "prod.example.com") view: Optional DNS view name or ID. Required when a zone exists in multiple views (e.g., "default", "Azure.private-2") subnet: Optional subnet address (CIDR) or ID for auto-IP assignment (e.g., "10.10.20.0/24"). Required when multiple subnets exist in the space and no IP is specified. auto_dns: If True (default), DNS records (A + PTR) are auto-generated atomically by the API during host creation — this matches the "Auto-generate DNS records" option in the UI. If False, DNS A and PTR records are created as separate API calls after host creation. dry_run: If True (default), only shows what would be created. Set to False to actually provision. comment: Optional description for the host
Returns: Complete provisioning result with host, IP, and DNS record details
Examples: - provision_host(hostname="web-01", space="prod", ip="10.20.3.50", zone="prod.example.com") → DRY RUN - provision_host(hostname="web-01", space="prod", ip="10.20.3.50", zone="prod.example.com", dry_run=False) - provision_host(hostname="db-replica-02", space="corp", subnet="10.10.20.0/24", dry_run=False)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | No | ||
| view | No | ||
| zone | No | ||
| space | Yes | ||
| subnet | No | ||
| comment | No | ||
| dry_run | No | ||
| auto_dns | No | ||
| hostname | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||