Hi, I've just started and trying to create Managem...
# getting-started
w
Hi, I've just started and trying to create Management Group with C# . But then, I can't get GroupID as output .
Copy code
var managementGroup = new AzureNative.Management.ManagementGroup("managementGroup", new AzureNative.Management.ManagementGroupArgs
        {
            Details = new AzureNative.Management.Inputs.CreateManagementGroupDetailsArgs
            {
                Parent = new AzureNative.Management.Inputs.CreateParentGroupInfoArgs
                {
                    Id = "/providers/Microsoft.Management/managementGroups/abb91b5c-16b1-4d24-96f6-9516b8daf6f9",
                },
            },
            DisplayName = "group name",
            GroupId = "groupd ID",
        });
The docs said _All input properties are implicitly available as output properties ,_but it seems not. Can someone help me get this please?
g
Can you post the error that you're getting?
w
@great-queen-39697 This is full code
Copy code
using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {   
        //Management group
        var managementGroup = new AzureNative.Management.ManagementGroup("managementGroup", new AzureNative.Management.ManagementGroupArgs
        {
            Details = new AzureNative.Management.Inputs.CreateManagementGroupDetailsArgs
            {
                Parent = new AzureNative.Management.Inputs.CreateParentGroupInfoArgs
                {
                    Id = "/providers/Microsoft.Management/managementGroups/abb91b5c-16b1-4d24-96f6-9516b8daf6f9",
                },
            },
            DisplayName = "GroupName",
            GroupId = "GroupID",
        });

        var managementGroupSubscription = new AzureNative.Management.ManagementGroupSubscription("managementGroupSubscription", new AzureNative.Management.ManagementGroupSubscriptionArgs
        {
            GroupId = managementGroup.GroupId,
            SubscriptionId = "3a496a85-c5f3-4379-b7f8-b06f5fd09b44",
        });
    }
    
}
This is the error
Copy code
MyStack.cs(24,39): error CS1061: 'ManagementGroup' does not contain a definition for 'GroupId' and no accessible extension method 'GroupId' accepting a first argument of type 'ManagementGroup' could be found (are you missing a using directive or an assembly reference?)
g
So, I didn't see anything, but I pinged a coworker who is better at C# than I am. Here's the response:
So I don't think that the 
GroupId
 that's an input to the 
ManagementGroup
 isn't the same as the input to the 
ManagementGroupSubscription
 - I think it should be 
managementgroup.id
 so it would look like this:
Copy code
public MyStack()
    {
        //Management group
        var managementGroup = new AzureNative.Management.ManagementGroup("managementGroup", new AzureNative.Management.ManagementGroupArgs
        {
            Details = new AzureNative.Management.Inputs.CreateManagementGroupDetailsArgs
            {
                Parent = new AzureNative.Management.Inputs.CreateParentGroupInfoArgs
                {
                    Id = "/providers/Microsoft.Management/managementGroups/abb91b5c-16b1-4d24-96f6-9516b8daf6f9",
                },
            },
            DisplayName = "GroupName",
            GroupId = "GroupID",
        });

        var managementGroupSubscription = new AzureNative.Management.ManagementGroupSubscription("managementGroupSubscription", new AzureNative.Management.ManagementGroupSubscriptionArgs
        {
            GroupId = managementGroup.Id,
            SubscriptionId = "3a496a85-c5f3-4379-b7f8-b06f5fd09b44",
        });
    }
I haven't run that code yet, but I think that should work