Skip to content

cub run get-cel

cub run get-cel

Extracts attribute values from configuration resources using a CEL expression that returns a list of attribute value maps. Evaluated once per resource. Supported toolchains: ConfigHub/YAML, Kubernetes/YAML, OpenTofu/HCL, AppConfig/Env, AppConfig/JSON, AppConfig/TOML, AppConfig/YAML, AppConfig/INI, AppConfig/Properties

cub run get-cel [flags]

Options

      --expression string   (required) CEL expression that extracts values from a resource. The current resource is available as 'r' (alias 'object'). Must return a list of maps, each with fields: ResourceName (string), ResourceType (string), Path (string), Value (any), and optionally AttributeName (string), DataType (string). The 'params' dict is also available.
  -h, --help                help for get-cel
      --param string        Parameters passed as key=value strings, accessible via the 'params' dict

Options inherited from parent commands

      --change-desc string      change description
      --changeset string        changeset to associate units with
      --context string          The context to use for this command
      --data-only               show config data without other response details
      --debug                   Debug output
      --display-mutations       display resource mutations
      --dry-run                 dry run mode: execute functions but skip updating configuration data
      --executor-space string   Space ID or slug whose executor to use for builtin functions (org-level only)
      --filter string           filter to apply (slug, space/filter, or UUID)
      --jq string               jq expression
      --json                    JSON output
      --livestate-type string   Invoke the function on the live state and use the flag value as the toolchain type for live state.
      --output-jq string        apply jq to output JSON
      --output-only             show output without other response details
      --quiet                   No output
      --resource-type string    resource-type filter
      --space string            space ID to perform command on
      --toolchain string        Toolchain type for the function invocations (default "Kubernetes/YAML")
      --unit strings            target specific units by slug or UUID (can be repeated or comma-separated)
      --wait                    wait for completion
      --where string            where filter
      --where-data string       where data filter
      --where-resource string   filter which resources the function operates on
      --worker string           worker to execute the function
      --yaml                    YAML output
      --yq string               yq expression

SEE ALSO