https://pulumi.com logo
#dotnet
Title
# dotnet
b

boundless-monkey-2042

06/25/2021, 5:28 PM
Having trouble aligning types for GetVirtualNetwork using values from a stackReference. There must be an easier way? var network = Pulumi.AzureNative.Network.GetVirtualNetwork.InvokeAsync(             new Pulumi.AzureNative.Network.GetVirtualNetworkArgs             {                 // ResourceGroupName =  (string)await spokeStack.RequireValueAsync("SpokeResourceGroupName"),                 ResourceGroupName = spokeStack.RequireOutput("SpokeResourceGroupName").Apply(value => value.ToString()),                 // VirtualNetworkName = (string)await spokeStack.RequireValueAsync("SpokeVnetName"),                 VirtualNetworkName = spokeStack.RequireOutput("SpokeVnetName").Apply(value => value.ToString()),             }         );
t

tall-librarian-49374

06/25/2021, 8:48 PM
You likely need to call it inside an
Apply
similar to https://github.com/pulumi/templates/blob/master/azure-csharp/MyStack.cs#L26
b

boundless-monkey-2042

06/28/2021, 5:00 PM
I'll buy your book when you write it. "Advanced Pulumi" 😉