Skip to content

metalcloud-cli os-template create

Create a new OS template from JSON configuration

Create a new OS template from JSON configuration.

This command creates a new OS template by reading configuration from a file or from standard input. The configuration should include both the template definition and any associated assets.

Required flags: —config-source Source of the template configuration (required) Can be ‘pipe’ to read from stdin, or path to a JSON file

The JSON configuration should follow the structure shown by the ‘example-create’ command, including template definition and optional template assets.

Examples:

metalcloud-cli os-template create —config-source template.json

cat template.json | metalcloud-cli os-template create —config-source pipe

metalcloud-cli os-template example-create > template.json

metalcloud-cli os-template create —config-source template.json

metalcloud-cli os-template create [flags]
--config-source string Source of the new OS template 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”