Get started with environment variables
hubble Studio offers multiple ways to securely create, update, and use environment variables for your applications.
Create environment variables
Once you create environment variables, you'll need to deploy the environments affected for the additions to take effect!
-
Log in to Hubble Studio and navigate to the project where you want to add environment variables.
-
Click on the "Variables" tab in the selected project.
-
Scroll down to the "Create Variable" section.
-
Enter a name for the new environment variable.
-
You can then set different values per deployment context:
- Same value for all deploy contexts: Choose this option if you want every deployment context to have the same value for this variable.
- Different value for each deploy context: Choose this option if you want to customize the value depending on the deployment contexts.
-
If you chose the "Same value for all deploy contexts" option, enter the desired value in the "Value" field.
-
If you chose the "Different value for each deploy context" option, enter the value for each deployment context in the corresponding input fields:
- Production: Only the production environment has that value.
- Preview: Every preview environment gets the value.
- Environment: Select specific environments that should get a value specific to them.
-
Once you are done, click on the "Create variable" button to save the new environment variable.
Modify and delete environment variables
You'll need to re-deploy the environments affected by your environment variable to apply the changes!
- Log in to Hubble Studio and navigate to the project where you want to add environment variables.
- Click on the "Variables" tab in the selected project.
- Scroll down to the "Manage Variables" section.
- Locate the variable that you want to edit and update the values as you want them.
- Once you are done, click on the "Update variable" button to save your changes.
Deleting environment variables is just as easy:
- Log in to Hubble Studio and navigate to the project where you want to add environment variables.
- Click on the "Variables" tab in the selected project.
- Scroll down to the "Manage Variables" section.
- Locate the variable that you want to delete
- Click on the "Delete" button to delete the variable
Note: Be careful when deleting environment variables as this action cannot be undone.