Variable Configuration
Configure variables for use across integrations and APIs
Variable Configuration
Defines variables that can be referenced throughout Weik.io configurations. Variables support different types and can be marked as secrets for sensitive data.
Schema Properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
| Value | string | Yes | - | The variable value |
| Type | string | No | "string" | Data type of the variable (string, number, boolean, json) |
| IsSecret | bool | No | false | Whether the variable contains sensitive data that should be encrypted |
YAML Examples
Basic Variables
apiVersion: weik.io/v1
kind: Variable
metadata:
name: database-host
spec:
Value: db.example.com
Type: string
---
apiVersion: weik.io/v1
kind: Variable
metadata:
name: max-retry-count
spec:
Value: "3"
Type: number
---
apiVersion: weik.io/v1
kind: Variable
metadata:
name: enable-logging
spec:
Value: "true"
Type: boolean
Secret Variables
apiVersion: weik.io/v1
kind: Variable
metadata:
name: database-password
spec:
Value: super-secret-password
Type: string
IsSecret: true
---
apiVersion: weik.io/v1
kind: Variable
metadata:
name: api-key
spec:
Value: sk_live_abc123xyz789
Type: string
IsSecret: true
JSON Variables
apiVersion: weik.io/v1
kind: Variable
metadata:
name: service-config
spec:
Value: |
{
"timeout": 30,
"retries": 3,
"endpoints": ["https://api1.example.com", "https://api2.example.com"]
}
Type: json
Usage Notes
Variables provide a centralized way to manage configuration values across your integrations and APIs. Reference variables in other configurations using the ${variableName} syntax.
Variable Types
string- Text values (default)number- Numeric values (integers or decimals)boolean- True/false valuesjson- Complex JSON objects or arrays
Secret Variables
When IsSecret is set to true:
- The variable value is encrypted at rest
- The value is masked in logs and UI displays
- Access to the variable requires appropriate permissions
Use secret variables for:
- Passwords and credentials
- API keys and tokens
- Connection strings with embedded credentials
- Any sensitive configuration data
Best Practices
Group related variables by naming convention:
database-host,database-port,database-nameapi-endpoint,api-key,api-timeout
Store environment-specific values as variables to enable configuration reuse across environments.