Skip to content

Environment Variables

tc uses special environment variables as feature bits and config overrides. The following is the list of TC environment variables:

We don’t have to always be in the topology or function directory to run a contextual tc command. TC_DIR env var sets the directory context

TC_DIR=/path/to/services/fubar tc create -s sandbox -e env

Path to TC config file. This config file is optional and has infrastructure overrides.

Set this to have a fixed sandbox name for all your sandboxes

TC_SANDBOX=my-branch tc create -e env

Set tracing level. This overrides —trace flag

TC_TRACE=1 tc create -e env
TC_TRACE=2 tc build ..

In cases, where we don’t have AWS profiles or Environment provider, we can assume role - typically useful in CI environments

TC_ASSUME_ROLE=my-iam-role tc create..

default: 4

Sets the chunk size for concurrently creating entities

TC_CREATE_CHUNK_SIZE=4 tc build --trace

To skip Image or Inline builds and update just code, do:

TC_SKIP_BUILD=1 tc create ...

To inspect the temporary build artifact and directory, particularly in Image and Inline builds, do:

TC_INSPECT_BUILD=1 tc build

To create, update, delete stable sandboxes (which are prohibited by default), use this var to override.

TC_FORCE_DEPLOY=1 tc create -s sandbox -e env

By default, tc does not delete the root entity (such as gateway, bus)

TC_FORCE_DELETE=1 tc create -s sandbox -e env

Global override for S3 bucket to use for cloudfront distributions when creating pages entity.

export TC_PAGES_BUCKET=my-bucket-name

At times we may need to use stable layers in non-stable sandboxes. This env variable allows us to use stable layers

TC_USE_STABLE_LAYERS=1 tc create -s sandbox -e env

To enable tracing data in the stepfunction logs, set

TC_SFN_DEBUG=1 tc update -s sandbox -e env

Set stepfunction log level dynamically

TC_SFN_LOG_LEVEL=debug tc update -s sandbox -e env

To remove stale rules that are not composed by tc

TC_PRUNE_EVENT_RULES=1 tc update -s sandbox -e env -c events

The ECR Repo URI global override. Config: aws.ecr.repo

tc, by default, concurrently creates the functions. To keep it more deterministic for debugging purposes:

TC_SYNC_CREATE=1 tc create ..

To update deploy metadata to a dynamodb table (the only stateful stuff in TC) for stable sandboxes

TC_UPDATE_METADATA=1 tc create -s staging -e env