Pulumi Concepts Inputs and Outputs: Difference between revisions
(→Output) |
(→Output) |
||
Line 17: | Line 17: | ||
Also see: {{Internal|Pulumi_Concepts#Stack_Output|Stack Outputs}} | Also see: {{Internal|Pulumi_Concepts#Stack_Output|Stack Outputs}} | ||
==Output Access Patterns== | |||
==<tt>apply()</tt>== | ===<tt>apply()</tt>=== | ||
{{External|https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#apply}} | {{External|https://www.pulumi.com/docs/intro/concepts/inputs-outputs/#apply}} | ||
Revision as of 21:45, 13 January 2022
External
Internal
Overview
The Pulumi programming model includes the concepts of Input and Output values, which model how output of one resource flow in as inputs of another resource.
Output
An Output encodes the relationship between infrastructure resources and a Pulumi application, by holding onto a piece of data and the resource it was generated from. When a consumer resource needs a piece of data generated by a provider resource, the consumer resource gets the Output of the provider resource, allowing it to know both the data value, and the provider resource it came from. This allows building a resource dependency graph, which Pulumi used to track dependencies between resources.
Stacks behave like any other resource, they are capable of producing data to be exported to other stacks, which access the data as stack outputs.
Access to the data being held onto by an Output instance must be done inside a callback, like apply()
, which will be called by the runtime if, and when the provider resource has the data available.
Also see:
Output Access Patterns
apply()
Input
Promise
Organizatorium
- TO PROCESS: https://www.pulumi.com/docs/intro/concepts/inputs-outputs/
pulumi.Output.concat(...)
- https://github.com/pulumi/pulumi/issues/3722