Hello, We are currently evaluating Pulumi for azur...
# general
k
Hello, We are currently evaluating Pulumi for azure deployments using the
pulumi-azure-native
golang sdk, part of it is to deploy the azure
Authorization/policySetDefinitions
and
Microsoft.Authorization/policyAssignments
all the policies are defined using Pulumi, however during the policy-assignment we are stuck on defining identity object. How will i define a
UserAssigned
identity, the
authorization.IdentityArgs
only have “Type”! The ARM template is like below:- ---------- “identity”: { “type”: “UserAssigned”, “userAssignedIdentities”: { “[parameters(‘userAssignedIdentity’)]“: {} } } --------
Copy code
authorization.NewPolicyAssignment(ctx, "policy-name", &authorization.PolicyAssignmentArgs{
	Identity: authorization.IdentityArgs{
		Type: idType,
	},
	PolicyAssignmentName: pulumi.String("policy-name"),
	PolicyDefinitionId:   pulumi.String("/subscriptions/xxx/providers/Microsoft.Authorization/policySetDefinitions/policy-def-name"),
	Scope:                pulumi.String("/subscriptions/xxx"),
})