/kind bug
What steps did you take and what happened:
[A clear and concise description of what the bug is.]
It looks like something might have changed on the Azure side. Role assignment creation used to be idempotent https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/811#issuecomment-662173226.
Now I'm seeing a bunch of RoleAssignmentExists errors in controller logs when using the system assigned flavor.
How to repro: use latest commit and deploy tilt system assigned flavor, look at capz controller logs.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version): /etc/os-release): cc @jackfrancis / @nader-ziada
/assign
This template is not idempotent unless the same roleNameGuid value is provided as a parameter for each deployment of the template. If no roleNameGuid is provided, by default a new GUID is generated on each deployment and subsequent deployments will fail with a Conflict: RoleAssignmentExists error.
https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-template
we need to somehow get the role assignment guid and update the VM with it?
I'm working on a fix, will have a PR out in a few minutes