Configuration

Learn how to configure Teabar for your organization, including authentication, cloud providers, and advanced settings.

Overview

Teabar configuration happens at three levels:

  1. CLI configuration (~/.teabar/config.yaml) - Local settings for teactl
  2. Organization settings - Team-wide defaults in the web dashboard
  3. Blueprint overrides - Per-environment customization

Quick Links

CLI Configuration

The teactl CLI stores configuration in ~/.teabar/config.yaml:

# Current active context
current-context: default

# Available contexts (for multiple orgs/environments)
contexts:
  default:
    organization: my-org
    api-url: https://api.teabar.dev
  staging:
    organization: my-org
    api-url: https://staging-api.teabar.dev

# Default values for new environments
defaults:
  provider: hetzner
  region: eu-central
  output: table

Setting Defaults

Set defaults to avoid repeating common options:

# Set default provider
teactl config set defaults.provider hetzner

# Set default region
teactl config set defaults.region eu-central

# Set default output format
teactl config set defaults.output json

Multiple Contexts

Use contexts to switch between organizations or API endpoints:

# Create a new context
teactl config set-context production 
  --organization prod-org 
  --api-url https://api.teabar.dev

# Switch contexts
teactl config use-context production

# Run command in specific context
teactl env list --context staging

Organization Settings

Configure organization-wide settings in the web dashboard:

  • Default provider and region for new environments
  • Cost limits and alerts
  • Team member access and roles
  • SSO/SAML configuration

Environment Variables

Override configuration with environment variables:

VariableDescription
TEABAR_CONFIGPath to config file
TEABAR_CONTEXTContext to use
TEABAR_TOKENOIDC token (for CI/CD)
TEABAR_API_URLAPI endpoint
TEABAR_ORGANIZATIONOrganization ID

CI/CD Example

# In your CI/CD pipeline
# Use a Keycloak service account token
export TEABAR_TOKEN="${{ secrets.TEABAR_SERVICE_TOKEN }}"
export TEABAR_ORGANIZATION="my-org"

teactl env create -f test-env.yaml --name pr-${{ CI_PIPELINE_ID }}

Configuration Precedence

When the same setting is specified multiple times, Teabar uses this precedence (highest to lowest):

  1. Command-line flags
  2. Environment variables
  3. Blueprint values
  4. Context settings
  5. Organization defaults
  6. Global defaults

Learn More

ende