Skip to main content

create

create environments

♻️ Create a new environment.

This command supports reading input from a file. Files can be supplied via the --file flag or piped into the command.

Example of file structure
{
"name": "My Environment",
"project_id": "00000000-0000-0000-0000-000000000000",
"region": "us-west-1"
}

Usage​

csph environments create [flags]

Aliases​

environments create, environments new, env create, env new, envs create, envs new, environment create, environment new

Options​

Command Specific​

--account <string>
account ID
--file <string>
specify a payload file [json|yaml], has precedence over other flags
--name <string>
name (required)
--private-network
private network [true|false]
--project <string>
project ID (required)
--region <string>
region (required)

Inherited​

--config <string>
config file (default is $HOME/.config/computesphere/configuration.yaml)
--debug
enable debug logging

-h, --help

show this help message

-i, --interactive

run interactively (prompts, pickers, table browser)
--log-level <string>
log level: [trace|debug|info|warn|error|fatal|panic|disabled||api]
--no-color
disable color output
--no-input
disable interactive mode

Examples​

# start an interactive session to create an environment
> csph environment create

# create an environment with required fields
> csph environment create --name "prod" --region us-east-1 --project <project-id>

# create an environment with all fields
> csph environment create \
--name "prod" \
--region us-east-1 \
--project <project-id> \
--private-network=true \
--account <account-id>

# create an environment from a file
> csph environment create --file /path/to/environment.yaml

# create an environment via stdin
> cat /path/to/environment.json | csph environment create

See also​