Skip to main content

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

NameTypeDefaultDescription
--app-id [required]stringAppflow app id
--name [required]stringAppflow environment name
--envstring[][]Variables to expose to your build. Variables defined this way override those loaded using the env-file flag. Example: --env VAR=value
--env-filestring[][]Files declaring environment variables to expose to your build. Variables from later files overwrite variables from earlier files.
--secretstring[][]Secrets to expose to your build. Example: --secret VAR=value

Global Flags

NameTypeDefaultDescription
-h, --helpbooleanfalsePrint help information for command
--configstringIonic Cloud config file (.ionic-cloud.yaml by default)
--jsonbooleanfalseFor commands with output, shortcut to print as JSON
--outputstring"text"For commands with output, print as [json] or human readable [text]
--tokenstringIonic authorization token

Outputs

NameTypeDescription
namestringThe name of an Environment you've created in Appflow.
variablesobject[]The combined list of all environment variables used for a build.
.namestringThe key of the environment variable.
.valuestringThe value of the environment variable.
secretsobject[]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.
.namestringThe key of the secret.
{
"name": "Test Environment",
"variables": [
{
"name": "myvar",
"value": "myvalue"
}
],
"secrets": null
}