late-ability-31616
06/11/2022, 8:24 PMOutput<string>
? I tried to do an assignment in the Apply
method, but even though the resource has been provisioned, it doesn't seem to execute:
var env = new CCloud.Environment(envName, args);
string envId = "Not set";
env.Id.Apply(v => envId = $"env-id = {v}");
File.WriteAllText(@"env-id.txt", envId);
File contains "Not set".
Is there some sort of Wait
that I need to wrap the Apply
call in?billowy-army-68599
File.WriteAllText
inside the Apply
so that the value has resolvedlate-ability-31616
06/11/2022, 8:38 PMbillowy-army-68599
Apply
to return a string, but still do some stuff inside the apply, right?late-ability-31616
06/11/2022, 8:40 PMenv.Id.Apply(v => { File.WriteAllText(@"env-id.txt", $"env-id = {v}"); return string.Empty; });
billowy-army-68599
late-ability-31616
06/11/2022, 8:40 PM