Skip to main content

Variable Sets

Variable Sets allow you to organize and manage environment variables that can be shared across multiple applications. This simplifies configuration management and ensures consistency.

What are Variable Sets?

A Variable Set is a collection of key-value pairs (environment variables) that you can attach to one or more applications. Instead of defining the same variables for each application, you create a reusable set.

Benefits

Reusability

Define variables once, use in multiple applications:

Database Variable Set → Used by: API, Worker, Admin Panel

Consistency

Ensure all applications use the same configuration values.

Easy Updates

Update a variable in one place, affects all applications using that set.

Organization

Group related variables together logically.

Creating Variable Sets

Step 1: Navigate to Variable Sets

  1. Go to Attachments > Variable Sets
  2. Click "Create Variable Set"

Step 2: Name and Description

Name: database-config
Description: Database connection settings for production

Step 3: Add Variables

Add key-value pairs:

DATABASE_HOST=postgres.example.com
DATABASE_PORT=5432
DATABASE_NAME=myapp_prod
DATABASE_USER=app_user
DATABASE_SSL=true

Step 4: Save Variable Set

Click "Create Variable Set" to save.

Using Variable Sets

Attach to Application

During application creation or editing:

  1. Navigate to "Environment Variables" section
  2. Click "Attach Variable Set"
  3. Select one or more variable sets
  4. Variables are automatically added to the application

Multiple Variable Sets

Attach multiple sets to one application:

Application: user-api

Attached Variable Sets:
- database-config (DATABASE_*)
- cache-config (REDIS_*)
- api-keys (API_KEY, SECRET_KEY)

Managing Variable Sets

Viewing Variable Sets

Click on a variable set to see:

  • All variables and values
  • Applications using this set
  • Last modified date
  • Created by

Editing Variable Sets

  1. Navigate to variable set details
  2. Click "Edit"
  3. Add, modify, or remove variables
  4. Save changes
caution

Changes will restart or rollout all applications using this variable set.

Versioning

Thevenin tracks variable set versions:

  • View change history
  • See who made changes
  • Restore previous versions
  • Compare versions

Deleting Variable Sets

  1. Ensure no applications are using the set
  2. Navigate to variable set details
  3. Click "Delete Variable Set"
  4. Confirm deletion

Security Features

Audit Logging

Track variable set changes in the variableset history:

  • Who made changes
  • What was changed
  • When changes occurred
  • Previous values

Examples

Database Configuration

# Variable Set: database-production
DATABASE_HOST=postgres-prod.example.com
DATABASE_PORT=5432
DATABASE_NAME=app_production
DATABASE_USER=app_user
DATABASE_PASSWORD=********
DATABASE_SSL=true
DATABASE_POOL_SIZE=20

API Configuration

# Variable Set: api-config
API_URL=https://api.example.com
API_VERSION=v1
API_TIMEOUT=30000
API_RETRY_ATTEMPTS=3

Authentication

# Variable Set: auth-secrets
JWT_SECRET=********
JWT_EXPIRATION=3600
OAUTH_CLIENT_ID=********
OAUTH_CLIENT_SECRET=********
SESSION_SECRET=********

Feature Flags

# Variable Set: feature-flags
FEATURE_NEW_DASHBOARD=true
FEATURE_BETA_API=false
FEATURE_ANALYTICS=true

External Services

# Variable Set: third-party-services
STRIPE_API_KEY=********
SENDGRID_API_KEY=********
AWS_ACCESS_KEY=********
AWS_SECRET_KEY=********
S3_BUCKET=uploads-production

Next Steps