Skip to main content
ubx console opens an interactive REPL for evaluating ubx expressions and testing built-in functions without writing a full .iac file.

Usage

ubx console

Examples

> lower("HELLO")
"hello"

> cidrsubnet("10.0.0.0/16", 8, 2)
"10.0.2.0/24"

> join("-", ["staging", "eu-west-1", "assets"])
"staging-eu-west-1-assets"

> merge({a = "1"}, {b = "2"})
{ a = "1", b = "2" }

> format("%s-%s", "myapp", "prod")
"myapp-prod"

> :exit

Supported Expressions

  • All 30 built-in functions
  • String interpolation: "${lower("HELLO")}-bucket"
  • Arithmetic: 2 + 3, 10 / 2
  • Boolean expressions: "prod" == "prod", 5 > 3
  • List and object literals

Not Supported in Console

  • ~ pending references (no cloud context)
  • input.* references (no config loaded)
  • Block definitions

Exit

> :exit
# or Ctrl+D