TYK_PMP_. The environment variables will take precedence over the values in the configuration file.
Environment Variable Type Mapping
When configuring Tyk components using environment variables, it’s important to understand how different data types are represented. The type of each variable is based on its definition in the Go source code. This section provides a guide on how to format values for common data types.| Go Type | Environment Variable Format | Example |
|---|---|---|
string | A regular string of text. | TYK_GW_SECRET="mysecret" |
int, int64 | A whole number. | TYK_GW_LISTENPORT=8080 |
bool | true or false. | TYK_GW_USEDBAPPCONFIG=true |
[]string | A comma-separated list of strings. | TYK_PMP_PUMPS_STDOUT_FILTERS_SKIPPEDAPIIDS="api1,api2,api3" |
map[string]string | A comma-separated list of key:value pairs. | TYK_GW_GLOBALHEADERS="X-Tyk-Test:true,X-Tyk-Version:1.0" |
map[string]interface{} | A JSON string representing the object. | TYK_GW_POLICIES_POLICYSOURCE_CONFIG='{"connection_string": "..."}' |
For complex types like
map[string]interface{}, the value should be a valid JSON string. For []string and map[string]string, ensure there are no spaces around the commas unless they are part of the value itself.