sparse-intern-71089
12/04/2021, 12:52 AMbillowy-army-68599
billowy-army-68599
busy-island-31180
12/04/2021, 12:56 AMbusy-island-31180
12/04/2021, 12:57 AMpulumi.String typebusy-island-31180
12/04/2021, 12:57 AMbusy-island-31180
12/04/2021, 12:57 AMpulumi.Stringbusy-island-31180
12/04/2021, 12:58 AMbusy-island-31180
12/04/2021, 12:58 AMpulumi.String type)busy-island-31180
12/04/2021, 12:58 AMbusy-island-31180
12/04/2021, 12:58 AMbillowy-army-68599
busy-island-31180
12/04/2021, 1:01 AMbusy-island-31180
12/04/2021, 1:01 AMtype FooBar struct {
Greeting string
}busy-island-31180
12/04/2021, 1:02 AMhello ${ec2instance.ID}busy-island-31180
12/04/2021, 1:02 AMbusy-island-31180
12/04/2021, 1:03 AMbillowy-army-68599
pulumi.StringInput and it'll accept either a string, or a pulumi.inputbillowy-army-68599
ApplyTbusy-island-31180
12/04/2021, 1:03 AMbillowy-army-68599
ApplyT which is how the value gets resolvedbillowy-army-68599
ApplyT basically means "wait for the result to be returned by the API, and then use the value when it is"busy-island-31180
12/04/2021, 1:04 AMFooBar.Greeting to something else… wouldn’t there be some sort of race condition for it to be populated?billowy-army-68599
ApplyT you wouldn't be able to pass it anywhere, it has to happen inside the ApplyT otherwise the value isn't knownbusy-island-31180
12/04/2021, 1:06 AMbusy-island-31180
12/04/2021, 1:07 AMbusy-island-31180
12/04/2021, 1:07 AMbillowy-army-68599
billowy-army-68599
busy-island-31180
12/04/2021, 1:14 AMbusy-island-31180
12/04/2021, 1:14 AMbusy-island-31180
12/04/2021, 1:14 AMtype FooBar Struct {
Greeting string
}busy-island-31180
12/04/2021, 1:15 AMpulumi.String) you essentially wrap your concrete model, in a pulumi “async” modelbusy-island-31180
12/04/2021, 1:15 AMstring if you intend on doing any real workbusy-island-31180
12/04/2021, 1:16 AMhttp.Get or whatever.. make an API call or somethingbusy-island-31180
12/04/2021, 1:16 AMbillowy-army-68599
ApplyT doesbusy-island-31180
12/04/2021, 1:18 AMpulumi.String("Foo") are so that you can take a value is known at compile time (or at pulumi up time) like reading a file from the filesystem, into these “async” inputsbusy-island-31180
12/04/2021, 1:18 AMbusy-island-31180
12/04/2021, 1:19 AMbusy-island-31180
12/04/2021, 1:19 AMbusy-island-31180
12/04/2021, 1:19 AMlocals undergoes this operationbusy-island-31180
12/04/2021, 1:20 AMlocals {
foo = aws_ec2_instance.foo.id
my_map_of_things = {
bar = local.foo
}
}
resource null_resource foo {
value = local.my_map_of_things["bar"]
}busy-island-31180
12/04/2021, 1:21 AMbusy-island-31180
12/04/2021, 1:22 AMchannel-like behavior you mentionedbusy-island-31180
12/04/2021, 1:22 AMbillowy-army-68599