创建自定义角色 [英] Creating Custom Role

查看:163
本文介绍了创建自定义角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 嗨'

 我正在尝试创建要应用于>的自定义角色10个订阅,我不想为每个订阅硬编码订阅ID,但是如何在JSON模板中完成它:

 I'm trying to create custom role that I want to apply to > 10 subscriptions and I don't want to hard code Subscriptions ID for each subscription but how can I accomplish it in JSON template:

这就是我所拥有的:

{

推荐答案

您是否考虑过使用参数文件存储预订ID,这样您就不必在特定模板中使用它们了吗?

Have you considered using a parameters file to store the subscription IDs so that way you don't have to have them in this specific template? 

您还可以考虑将其部署为私有模板,以避免其他人看到订阅ID

You could also consider deploying as a private template to avoid others seeing the subscriptions ids

https://docs.microsoft.com /en-us/azure/azure-resource-manager/resource-manager-powershell-sas-token

主要问题是您不想列出订阅ID吗?对于自定义角色,似乎只能部署一次.因此,必须对一些订阅ID进行硬编码是执行此操作的最简单方法,并且一旦角色 创建的人都无法看到这些ID

Is the main issue that you do not want to have the subscription IDs listed? For a custom role it seems like something you could only be deploying once. So having to hardcode a few subscription IDs would be the simplest way to do this and once the role is created no one should be able to see those IDs

 


这篇关于创建自定义角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆