RunAsExisting is deploying role assignments #8051
Replies: 1 comment 4 replies
-
@DanielToft Thanks for starting up this discussion! Our implementation of the We haven't quite sorted out the best stance on this. Should we avoid assigning role assignments altogether for existing resources? What if the the correct role assignments aren't provisioned? In this case, they would surface even later to the user when they attempted to interact with the resource. For the moment, assuming you know your users have the correct assignments configured, you'll have to pair the builder.AddAzureStorage("storage")
.RunAsExisting("myexistingresourcename")
.ConfigureInfrastructure(infrastructure => {
var roleAssignments = infrastructure.GetProvisionableResources().OfType<RoleAssignment>().Where(filter);
foreach (var roleAssignment in roleAssignments)
{
infrastructure.Remove(roleAssignment);
}
}); |
Beta Was this translation helpful? Give feedback.
-
Hi
I'm not sure I understand the purpose of RunAsExisting.
Why is it deploying role assignments to the resource for the user running the aspire project? If the user running the aspire project does not have access to the resources, the bicep script will also not have access to deploy the role assignments.
Is it possible to override this? I would like to have this feature, but I do not want all employees to have direct access to the resources. This will be impossible to control. We already have a model to give employees access to the right resources.
Today I'm using AddConnectionString, but I think it would be nice to have the resources shown in the dashboard as I would with RunAsExisting.
Beta Was this translation helpful? Give feedback.
All reactions