https://pulumi.com logo
Title
e

early-sugar-1496

11/30/2020, 11:22 AM
Hi, I'm trying to create a roleAssignment but preview keeps telling me
missing required property 'properties.principalId'
, is it because i'm using apply?
using AzureAuth = Pulumi.AzureNextGen.Authorization.Latest;

            new AzureAuth.RoleAssignment(
                $"NetworkContributor",
                new AzureAuth.RoleAssignmentArgs
                {
                    Scope = _cluster.NodeResourceGroup!,
                    RoleAssignmentName = "Network Contributor",
                    Properties = new AzureAuth.Inputs.RoleAssignmentPropertiesArgs
                    {
                        PrincipalId = _cluster.Identity.Apply(identity => identity!.PrincipalId),
                        RoleDefinitionId = "",
                    },
                });
t

tall-librarian-49374

11/30/2020, 11:45 AM
I believe that’s because
Latest
doesn’t have that property.
Latest
refers to the lastest stable version which is very old for this resource.
Try
V20200401Preview
Oh, wait, I may have misread the error
e

early-sugar-1496

11/30/2020, 12:47 PM
Ah thanks, it looks like it's related to that issue