pulumi/tests/testdata/codegen/synthetic-resource-properti.../dotnet/synthetic-resource-properti...

19 lines
472 B
C#
Raw Permalink Normal View History

using System.Collections.Generic;
2023-03-24 11:43:46 +00:00
using System.Linq;
using Pulumi;
using Synthetic = Pulumi.Synthetic.Synthetic;
return await Deployment.RunAsync(() =>
{
var rt = new Synthetic.ResourceProperties.Root("rt");
return new Dictionary<string, object?>
{
["trivial"] = rt,
["simple"] = rt.Res1,
["foo"] = rt.Res1.Apply(res1 => res1.Obj1?.Res2?.Obj2),
["complex"] = rt.Res1.Apply(res1 => res1.Obj1?.Res2?.Obj2?.Answer),
};
});