KOP Environment Manager - Expressions - Rafay Product Documentation

Overview

Expressions enable users to dynamically configure input variables by utilizing the output of other resources or configurations. This capability allows platform teams to create programmable templates for provisioning infrastructure and applications. Using resource output as input to another via expressions refers to taking the output of one resource, such as a Terraform resource template, and using it as input for another resource. In Terraform, outputs are defined in the configuration, as shown below:

output "vpc_id" {
  value = module.vpc.vpc_id
}

Currently, only Terraform is supported for outputs, but two types of expressions such as CUE, and Starlark can be used to enhance flexibility, validation, and data extraction across workflows.

Recommendation: It is recommended to use Starlark expressions as they provide a powerful and flexible way to handle complex logic within the Rafay environment. Utilizing a subset of Python, Starlark enables programmability and computations. This language offers the advantage of interacting directly with Rafay APIs through expressions, facilitating the creation of dynamic and adaptable workflows.