sparse-intern-71089
05/27/2020, 6:16 PMgentle-diamond-70147
05/27/2020, 7:16 PM.Get(spotRequest.GetResourceName(), ...
to a different value to avoid that error.best-receptionist-98400
05/27/2020, 8:31 PMvar spotOutput = Output.Create(Pulumi.Aws.Ec2.SpotInstanceRequest.Get($"{spotRequest.GetResourceName()}-{i}", spotRequest.Id, null, new CustomResourceOptions
{
DependsOn = spotRequest
}));
Console.WriteLine($"{spotOutput.Apply(x => x.SpotInstanceId)}");
And
var spotOutput = Pulumi.Aws.Ec2.SpotInstanceRequest.Get($"{spotRequest.GetResourceName()}-{i}", spotRequest.Id, null, new CustomResourceOptions
{
DependsOn = spotRequest
});
Console.WriteLine($"{spotOutput.SpotInstanceId.Apply(x => x)}");
best-receptionist-98400
05/27/2020, 8:32 PMgentle-diamond-70147
05/27/2020, 8:40 PMspotOutput.SpotInstanceId.Apply(x => Console.WriteLine(x));
?
Apologies, C# isn't my go-to language, but that's how you would do it in one of the other languages.best-receptionist-98400
05/27/2020, 8:44 PMbest-receptionist-98400
05/27/2020, 8:51 PMgentle-diamond-70147
05/27/2020, 8:52 PMbest-receptionist-98400
05/27/2020, 8:54 PMbest-receptionist-98400
05/27/2020, 8:59 PMgentle-diamond-70147
05/27/2020, 9:51 PMbroad-dog-22463
05/27/2020, 9:55 PMbroad-dog-22463
05/27/2020, 9:55 PMbroad-dog-22463
05/27/2020, 9:55 PMbest-receptionist-98400
05/27/2020, 9:56 PMbest-receptionist-98400
05/27/2020, 10:01 PMbroad-dog-22463
05/27/2020, 10:03 PMbroad-dog-22463
05/27/2020, 10:03 PMbroad-dog-22463
05/27/2020, 10:14 PMbroad-dog-22463
05/27/2020, 10:14 PMbest-receptionist-98400
05/27/2020, 10:16 PMbest-receptionist-98400
05/28/2020, 2:24 AMtall-librarian-49374
05/28/2020, 6:31 AMbest-receptionist-98400
05/28/2020, 1:59 PMDependsOn
on the SpotInstanceRequest.Get
? I've run this a few times this morning and it's always worked the first try. I'm assuming because I have the DependsOn as well as the WaitForFulfillment
set on the initial spot request?
Or am I just getting lucky that the value has always been ready the first time?best-receptionist-98400
05/28/2020, 1:59 PMtall-librarian-49374
05/28/2020, 2:00 PMbest-receptionist-98400
05/28/2020, 2:05 PMSpotInstanceId
is there before running the SDK operation.