metalcloud-cli subnet update¶
Update an existing subnet
Synopsis¶
Update an existing subnet in the MetalCloud infrastructure.
This command updates a subnet with the configuration provided through JSON input. Only the fields included in the configuration will be updated, other fields remain unchanged.
Arguments: subnet_id The ID of the subnet to update
Required Flags: –config-source Source of the subnet configuration updates. Can be ‘pipe’ to read from stdin, or a path to a JSON file containing the configuration.
Configuration Format: The JSON configuration can contain the following fields (all optional for updates):
label: Human-readable label for the subnet
name: Subnet name
defaultGatewayAddress: Gateway IP address
isPool: Whether this subnet is an IP pool (true/false)
allocationDenylist: List of IP ranges to exclude from allocation
childOverlapAllowRules: Rules for allowing child subnet overlaps
tags: Key-value pairs for tagging
annotations: Additional metadata
Note: Core network settings (networkAddress, prefixLength) typically cannot be modified after subnet creation due to infrastructure constraints.
Examples:
Update subnet from stdin¶
echo ‘{“label”:”updated-subnet”,”isPool”:true}’ | metalcloud-cli subnet update 123 –config-source pipe
Update subnet from file¶
metalcloud-cli subnet update 456 –config-source updates.json