sparse-intern-71089
05/26/2022, 3:25 AMhallowed-australia-10473
05/26/2022, 3:44 AMancient-car-89914
05/26/2022, 6:00 AMapply
is for?ancient-car-89914
05/26/2022, 6:04 AMlittle-cartoon-10569
05/26/2022, 11:11 PMgetConfig()
creates user data, and it can depend on other resources.hallowed-australia-10473
05/27/2022, 12:36 AMapply
was for as well, but when I tried, it didn’t seem to matter. 😞hallowed-australia-10473
05/27/2022, 12:37 AMapply
if you’re getting one object’s internals for another.little-cartoon-10569
05/27/2022, 12:37 AMapply
, it causes side effects.little-cartoon-10569
05/27/2022, 12:41 AMWhat I want to do in my Python script is block until the output is the actual nameThis isn't quite correct. Possibly you can do this (I don't know how Python's asynchronous support works), but you probably shouldn't. Instead, you can either 1. do you printing inside the apply, which can be useful in debugging circumstances, or 2. export the value from the stack, and Pulumi will print it for you whenever it changes (or whenever you ask it to).
hallowed-australia-10473
05/27/2022, 12:42 AMhallowed-australia-10473
05/27/2022, 12:42 AMhallowed-australia-10473
05/27/2022, 12:42 AMlittle-cartoon-10569
05/27/2022, 12:43 AMhallowed-australia-10473
05/27/2022, 12:43 AMlittle-cartoon-10569
05/27/2022, 12:43 AMlittle-cartoon-10569
05/27/2022, 12:43 AMhallowed-australia-10473
05/27/2022, 12:44 AMhallowed-australia-10473
05/27/2022, 12:44 AMhallowed-australia-10473
05/27/2022, 12:44 AMhallowed-australia-10473
05/27/2022, 12:44 AMlittle-cartoon-10569
05/27/2022, 12:44 AMconst userdata = bucket.bucket.apply(bucketName => `Your big string includes ${bucketName}`);
hallowed-australia-10473
05/27/2022, 12:45 AMlittle-cartoon-10569
05/27/2022, 12:45 AMpulumi.all()
.hallowed-australia-10473
05/27/2022, 12:45 AMhallowed-australia-10473
05/27/2022, 12:45 AMlittle-cartoon-10569
05/27/2022, 12:45 AMlittle-cartoon-10569
05/27/2022, 12:46 AMconst val1 = "X";
const val2 = "Y";
const userdata = bucket.bucket.apply(bucketName => `Your big string includes ${bucketName} and ${val1} and ${val2}`);
little-cartoon-10569
05/27/2022, 12:46 AMuserdata
is an output not a string, and you pass it to your resource constructor. You don't pass a string to it.hallowed-australia-10473
05/27/2022, 12:47 AMhallowed-australia-10473
05/27/2022, 12:48 AMlittle-cartoon-10569
05/27/2022, 12:56 AMlittle-cartoon-10569
05/27/2022, 12:56 AMhallowed-australia-10473
05/27/2022, 12:58 AMlittle-cartoon-10569
05/27/2022, 12:58 AMhallowed-australia-10473
05/27/2022, 12:58 AMhallowed-australia-10473
05/27/2022, 12:58 AMhallowed-australia-10473
05/27/2022, 1:20 AMhallowed-australia-10473
05/27/2022, 1:20 AMhallowed-australia-10473
05/27/2022, 1:21 AMhallowed-australia-10473
05/27/2022, 1:28 AMhallowed-australia-10473
05/27/2022, 1:37 AM