worried-knife-31967
03/29/2021, 4:00 PMOutput<T>
parameters.
That's possibly specific to C# thoughglamorous-helmet-50600
03/29/2021, 4:04 PMworried-knife-31967
03/29/2021, 4:05 PMresourceGroup.Name
as a reference to the original object, so that you get automatic dependency graph. I'm not sure if it converts automatically?glamorous-helmet-50600
03/29/2021, 4:06 PMpublic class NewApp : ComponentResource
{
public Input<string>? ResourceGroup;
public Input<string> ResourceGroupName;
public NewApp(string name, Input<string>? group, ComponentResourceOptions opts) : base("NewAppType", name, opts)
{
var azureConfig = new Pulumi.Config("azure");
var location = azureConfig.Require("location");
if(group != null) {
ResourceGroupName = group;
}
else {
var resourceGroup = new AzureNextGen.Resources.Latest.ResourceGroup("rg-test-dev3", new AzureNextGen.Resources.Latest.ResourceGroupArgs {
Location = location,
ResourceGroupName = "rg-test-dev3"
});
ResourceGroupName = resourceGroup.Name;
}
...
little-vegetable-79574
03/30/2021, 12:09 AMInput<XxxResourceType>
actually works, i.e.
/// <summary>
/// Resource group.
/// </summary>
[Input ("resourceGroup", required: true)]
public ResourceGroup ResourceGroup { get; set; } = null!;
glamorous-helmet-50600
04/02/2021, 7:19 PM