ionic-cloud environment create
[ionic-cloud, environment, create]
Create a new environment for an app in Appflow
ionic-cloud environment create [flags]
Examples
ionic-cloud environment create --app-id=a1234bc --name="My Env" --env="URL=localhost:3000"
ionic-cloud environment create --app-id=a1234bc --name="My Env" --env="URL=localhost:3000" --env="CI=true"
ionic-cloud environment create --app-id=a1234bc --name="My Env" --env="URL=localhost:3000" --env="CI=true" --secret="API_KEY=123"
Flags
Name | Type | Default | Description |
---|---|---|---|
--app-id [required] | string | Appflow app id | |
--name [required] | string | Appflow environment name | |
--env | string[] | [] | Variables to expose to your build. Variables defined this way override those loaded using the env-file flag. Example: --env VAR=value |
--env-file | string[] | [] | Files declaring environment variables to expose to your build. Variables from later files overwrite variables from earlier files. |
--secret | string[] | [] | Secrets to expose to your build. Example: --secret VAR=value |
Global Flags
Name | Type | Default | Description |
---|---|---|---|
-h, --help | boolean | false | Print help information for command |
--config | string | Ionic Cloud config file (.ionic-cloud.yaml by default) | |
--json | boolean | false | For commands with output, shortcut to print as JSON |
--output | string | "text" | For commands with output, print as [json] or human readable [text] |
--token | string | Ionic authorization token |
Outputs
Name | Type | Description |
---|---|---|
name | string | The name of an Environment you've created in Appflow. |
variables | object[] | The combined list of all environment variables used for a build. |
.name | string | The key of the environment variable. |
.value | string | The value of the environment variable. |
secrets | object[] | The combined list of all environment secrets used for a build. The key values are not downloaded; the key names are just displayed for reference. |
.name | string | The key of the secret. |