Assign permissions on AKS MC_ RG automatically
Hello,
I'm the IT guy and we try to limit the access on our MSP environments (least privilege etc) and limit the cost. When someone in the company needs an AKS cluster for tests purposes for a few days / weeks, we create a RG and set the needed permissions so that he can create an AKS cluster and then delete it when he no longer needs it.
The issue is that when the AKS cluster is created, a MC_ RG is being created and we need to set additional permissions on it (e.g. the "Reader" permission).
We feel that it is time consuming and would like to know if there is a way to avoid this.
Is there any easy way to automate the permissions assignment ? I guess we could create a Jenkins job which retrieves the existing MC_ RGs with Az CLI commands and assigns the permissions automatically, but I was wondering if there was an easier and cleaner way to do this.
Looks like "Azure Policy" can set permissions automatically even id it's not its real purpose, but it doesn't solve my issue because the MC_ RGs names are gonna change everytime and looks like I cannot use variables and do "smart" things in Azure Policy.
We also could use an Event triggered Azure function but I find it very hard to maintain as I would like a non-time consuming solution which does not imply using a VScode with the Azure extension and having to push everytime to make a modification.
Maybe I'm looking on the wrong side and I could just tell my users to delete the node group in the AKS cluster so that it reduces the cost by 95% ? They would then recreate it when needed.
What are your recommendations about my issue ?
Many Thanks
1 answer
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more