Hi, any good resources on how to debug pulumi Go w...
# golang
c
Hi, any good resources on how to debug pulumi Go with Goland. I'm able to start the debugger and watch some values. But for example if I want to debug my vnet values, that I pass to my storage function. All I see is different type... but the value I can never watch what's in! In my vnet I created a subnet that I want to use for my storage. How can I see in goland debugger my subnet values during debbuging ? All I see is my var like: vhub.Subnets.OutputState with many other props but nothing usefull...
e
The
value
prop of
OutputState
would have the value (if known), I generally just look at the debug logs (add
-v10 --logtostderr
to the pulumi command line) for checking values.
c
So when I run pulumi up, then say Yes. When my resource has been created and pass to my other function I should see the values ?
I tried -v10 --logtostderr, there is so much stuff happening in my terminal window it never finish...
How can I assign my VirtualNetworkResourceId ?
Copy code
func CreateStorageAccount(ctx *pulumi.Context, name string, rg string, vNet *network.VirtualNetwork) (*storage2.StorageAccount, error) {

   st, err := storage2.NewStorageAccount(ctx, name, &storage2.StorageAccountArgs{
      AccountName:            pulumi.String(name),
      EnableHttpsTrafficOnly: pulumi.Bool(false),
      EnableNfsV3:            pulumi.Bool(false),
      IsHnsEnabled:           pulumi.Bool(true),
      Kind:                   pulumi.String("StorageV2"),
      Sku: &storage2.SkuArgs{
         Name: pulumi.String("Standard_LRS"),
      },
      Location: pulumi.String("canadacentral"),
      NetworkRuleSet: &storage2.NetworkRuleSetArgs{
         Bypass:        pulumi.String("None"),
         DefaultAction: storage2.DefaultActionAllow,
         //IpRules:       storage2.IPRuleArray{},
         VirtualNetworkRules: storage2.VirtualNetworkRuleArray{
            &storage2.VirtualNetworkRuleArgs{
             ---------->  VirtualNetworkResourceId: vNet.Subnets.OutputState.,   <---------
            },
         },
      },
      ResourceGroupName: pulumi.String(rg),
   })
   if err != nil {
      return nil, err
   }
   return st, nil
}
e