Getting started / Reference /
Variables

Variables

Overview

Variables are environment variables and secrets injected into your application containers. They provide configuration, connection strings, API keys, and other settings needed by your application at runtime. Tapitalee supports both plaintext variables and encrypted secrets.

Purpose and Benefits

  • Centralized Configuration: Manage all application settings in one place
  • Secret Management: Encrypted storage for sensitive values via AWS Secrets Manager
  • Automatic Injection: Variables are automatically available in all containers
  • Separation of Concerns: Keep configuration separate from code

CLI Usage

Set Variable

Set an environment variable on the app

tapit set variable <variable_name> <variable_value> [secret=yes]

Arguments

  • - The variable name and value to set

Parameters

  • secret: Mark the variable as a secret (encrypted at rest, hidden in listings). Use yes to enable.

Examples

# Set a regular configuration variable
tapit set variable DATABASE_POOL 10

# Set a secret API key
tapit set variable STRIPE_SECRET_KEY sk_live_abc123 secret=yes

# Set a connection URL
tapit set variable REDIS_URL redis://localhost:6379

Show Variable

Show the value of a specific environment variable

tapit show variable <variable_name>

Arguments

  • - Name of the variable to retrieve

Examples

tapit show variable DATABASE_URL
tapit show variable STRIPE_SECRET_KEY

List Variables

List all environment variables for the app (values not shown; use show variable for a specific value)

tapit list variables

Delete Variable

Delete an environment variable from the app

tapit delete variable <variable_name>

Arguments

  • - Name of the variable to delete

Examples

tapit delete variable OLD_API_KEY
tapit delete variable DEPRECATED_SETTING

Export Variables

Export all app environment variables as KEY=”value” lines to stdout

tapit export variables [secret=yes|no]

Parameters

  • secret: Include secret variable values in the output (yes/no, default: no)

Examples

# Export all variables to a file
tapit export variables > .env

# Export only secrets
tapit export variables secret=yes > secrets.env

# Export only non-secret variables
tapit export variables secret=no > config.env

# Export from a specific app
tapit -a myapp-prod export variables > prod.env

Import Variables

Import environment variables from a KEY=value file on stdin

tapit import variables [secret=yes] < file_with_KEY=value_entries

Parameters

  • secret: Mark all imported variables as secrets (yes/no)

Examples

# Import regular variables from a .env file
tapit import variables < .env

# Import all as secrets
tapit import variables secret=yes < production.env

Clone Variables

Copy all environment variables from a source app into the destination app

tapit [-a dest_app_name] clone variables <source_app_name> [exclude=KEY1,KEY2] [from_team=team_name]

Arguments

  • - Name of the app to copy variables from

Parameters

  • exclude: Comma-separated list of variable names to skip
  • from_team: Team name to look up the source app in (required if the app name exists in multiple teams)

Examples

# Clone all variables from another app
tapit -a myapp-staging clone variables myapp-prod

# Clone excluding certain keys
tapit -a myapp-dev clone variables myapp-prod exclude=STRIPE_KEY,SENDGRID_KEY

# Clone from a different team
tapit -a myapp clone variables other-app from_team=other-team

Variable Types

Regular Variables

  • Stored as plaintext in the database
  • Suitable for non-sensitive configuration values
  • Examples: PORT, LOG_LEVEL, DATABASE_POOL

Secrets

  • Encrypted using AWS Secrets Manager
  • Suitable for API keys, passwords, tokens
  • Examples: DATABASE_URL, API_SECRET_KEY, SMTP_PASSWORD

System Variables

Tapitalee automatically injects the following TAP_* variables into all app containers. These are read-only and cannot be overridden.

Variable Description
TAP_APP_NAME The name of your application
TAP_APP_DOMAIN The primary domain/hostname of your application
TAP_APP_URL The full URL of your application (including https://)
TAP_TEAM_NAME The name of the team that owns the application
TAP_DEPLOY_NUMBER The sequential deployment number
TAP_DOCKER_TAG The Docker image tag being deployed
TAP_PARENT_APP The name of the parent app (present only for preview apps)

Add-On Variables

When you create add-ons (databases, storage, etc.), Tapitalee automatically injects connection variables:

  • RDS: DATABASE_URL (or custom name)
  • ElastiCache: REDIS_URL (or custom name)
  • S3: S3_BUCKET_<name> and related variables
  • EFS: EFS_MOUNT_POINT (or custom name)
  • DocumentDB: MONGO_URL (or custom name)

Add-on variables are managed automatically and cannot be manually deleted while the add-on exists.