Create an Environment

Environments can be created using the Bluebricks API, Command Line, or User Interface.

Overview

Environments organize infrastructure into clear units that match how teams actually work. You can create separate environments for projects, teams, or lifecycle stages such as development, staging, and production. Each environment provides the foundation for deployments by holding shared settings and rules.

Create an environment via the UI

  • Log in to the Bluebricks App.

  • Navigate to the Environments section.

  • Click Create Environment.

  • Enter a name for the environment.

  • Select the cloud provider(s) to connect.

  • Configure any required settings, permissions, and secrets.

  • Click Create to finalize the setup.

Create an environment via the CLI

You can create a new environment using the Bluebricks CLI (refer to Bricks CLI Installation Guide if you haven't installed it yet):

bricks env create --name="Self-Hosted Orchestrator"

A successful creation will display a confirmation message with the new environment ID:

✓ `Self-Hosted Orchestrator` environment created successfully with ID: 42c9d5cf-cf9c-4783-ac1d-4d34140b9299

Creating an Environment via the API

You can also create an environment using a direct API call. First, you'll need to obtain a valid bearer token:

Create an environment via the API

Using the bearer token you obtained, make the API call to create an environment:

curl https://api.bluebricks.co/api/v1/environments \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
  --data '{
    "name": "Self-Hosted Orchestrator",
    "description": "Environment for self-hosted orchestrator"
  }'

Replace YOUR_BEARER_TOKEN with your token.

Last updated

Was this helpful?