https://pulumi.com logo
#azure
Title
# azure
l

lemon-laptop-7435

12/08/2023, 4:15 PM
Also having issues assigning azure built in roles to a user assigned identity, I am getting
Copy code
Bad Request - Invalid URL
Copy code
acr_pull_role_assignment = azure_native.authorization.RoleAssignment("acrPull",
    principal_id=user_assigned_identity.client_id,
    principal_type="User",
    role_assignment_name="AcrPull",
    scope=f"/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/{utic_hosted_api_rg.name}/providers/Microsoft.ContainerRegistry/registries/protogenus",
    role_definition_id=f"/subscriptions/{SUBSCRIPTION_ID}/providers/Microsoft.Authorization/roleDefinitions/AcrPull")
I also tried it with the roles id like
Copy code
f"/subscriptions/{SUBSCRIPTION_ID}/providers/Microsoft.Authorization/roleDefinitions/7f951dda-4ed3-4680-a7ca-43fe172d538d")
b

bitter-carpenter-93554

12/08/2023, 8:20 PM
roleDefinitions/7f951dda-4ed3-4680-a7ca-43fe172d538d
this one is correct. it should be id
l

lemon-laptop-7435

12/08/2023, 8:20 PM
ok will try that, thanks!
b

bitter-carpenter-93554

12/08/2023, 8:20 PM
check the scope