When building a ComponentResource, should I create...
# dotnet
When building a ComponentResource, should I create properties on it that are of type Output like in this sample https://github.com/pulumi/examples/blob/master/classic-azure-cs-cosmosapp-component/CosmosApp.cs or should we use a dictionary that is called with the method registerOutputs like on the documentation https://www.pulumi.com/docs/intro/concepts/resources/components/#registering-component-outputs I need outputs to pass some properties to another component.
You can actually do both. The
method is just a shorthand to call the main
method with an empty dictionary. Nothing in the engine really needs those values in the register output call, but it will add it to the diff display while running preview or up.
👍 1
Ok, thanks.