Skip to content

metalcloud-cli file-share create

Create a new file share with specified configuration

Create a new file share within the specified infrastructure using configuration from a JSON file or pipe input.

This command creates a new file share resource with the specified configuration including storage size, access permissions, and other settings.

Required Arguments: infrastructure_id_or_label The infrastructure ID (numeric) or label to create the file share in

Required Flags: —config-source Source of the new file share configuration Can be ‘pipe’ for stdin input or path to a JSON file

Configuration Format: The configuration should be a JSON object containing file share properties such as:

  • name: File share name
  • size: Storage size
  • type: File share type
  • access_mode: Access permissions
  • mount_path: Mount path for clients

Examples:

Create a file share from a JSON configuration file

Section titled “Create a file share from a JSON configuration file”

metalcloud-cli file-share create my-infrastructure —config-source config.json

echo ’{“name”:“shared-storage”,“size”:“100GB”}’ | metalcloud-cli file-share create my-infrastructure —config-source pipe

metalcloud-cli file-share create 12345 —config-source /path/to/config.json

metalcloud-cli file-share create infrastructure_id_or_label [flags]
--config-source string Source of the new file share configuration. Can be 'pipe' or path to a JSON file.
-h, --help help for create
-k, --api_key string MetalCloud API key
-c, --config string Config file path
-d, --debug Set to enable debug logging
-e, --endpoint string MetalCloud API endpoint
-f, --format string Output format. Supported values are 'text','csv','md','json','yaml'. (default "text")
-i, --insecure_skip_verify Set to allow insecure transport
-l, --log_file string Log file path
-v, --verbosity string Log level verbosity (default "INFO")

Auto generated by spf13/cobra on 11-Aug-2025

Section titled “Auto generated by spf13/cobra on 11-Aug-2025”