CorefinityCorefinityDocs
Open the Control PanelControl Panel
CoreStack Enterprise · 4 of 10

Environment variables

Add, change and remove the variables a CoreStack Enterprise environment's deployments read.

On this page

Before you start

  • You can open the environment: see Websites and environments.
  • Each environment has its own variables, up to 100.
  • The deployment pipeline reads a variable under its name with CF_ in front: NPM_TOKEN is read as CF_NPM_TOKEN.

Add a variable

  1. Open Environment Variables

    Open the environment, choose Deployments and find Environment Variables.

  2. Enter the key and value

    Choose Add environment variable. Enter the key, using letters, digits and underscores and starting with a letter or an underscore, then the value, of up to 2,048 characters.

  3. Save

    Choose Save on the row.

The next deployment reads the variable. A saved value is masked: choose Show to read it.

Change or remove a variable

  1. Edit the row

    Change the key or enter a new value, then choose Save on the row. To delete the variable, choose Remove and confirm.

The change takes effect from the next deployment.

Automate this

Environment variables

Creates the variable when the environment does not have it (201), and changes it otherwise (200).

PUT/api/environments/{environment}/variables/{name}
curl -X PUT https://manage.corefinity.com/api/environments/1311/variables/API_TOKEN \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "example-value-not-a-real-secret"
  }'
Was this helpful?
Open in ClaudeOpen in ChatGPT