data binding reads information about an existing cloud resource without bringing it under ubx management. It’s the equivalent of Terraform’s data sources. Data bindings live inside a stack body, next to regular resource declarations.
Syntax
data keyword in front.
Example
Look up the latest Amazon Linux 2 AMI, then use it:Look up an existing VPC
Data source outputs
Attributes read from a data source are pending values — they are fetched at apply time from the cloud provider, and the typechecker tracks them the same way it tracks resource outputs:In generated code
For the Pulumi Python engine, a data binding compiles to the provider’sget_* lookup function; for the Terraform and OpenTofu engines it becomes a data block in main.tf.
