未包含标记时,ARM模板无法更新属性。 [英] ARM template fails to update the properties when Tags are not included.

查看:54
本文介绍了未包含标记时,ARM模板无法更新属性。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于模板: - https://docs.microsoft.com/en-us/azure/templates/microsoft.network/2018-11-01/routetables/routes

没有但是,如果Azure策略"拒绝没有标记的资源部署",则在其中定义标记。在订阅时启用,然后上面的模板无法部署,因为它没有标记。



代码片段如下: -


{

" name":" string",

" type":" Microsoft.Network/routeTables/routes",

"apiVersion":" 2018-11-01",$
" properties":{

" addressPrefix":" ; string",

" nextHopType":" string",

" nextHopIpAddress":" string"

}

}

解决方案

您能否使用以下模板创建带有标签的路由表:


 {
" name":" string",
" type":" Microsoft。 Network / routeTables / routes",
" apiVersion":" 2018-11-01",
" tags":{
" TagName":&q UOT; TagValue"
},
" properties" ;: {
" addressPrefix":" string",
" nextHopType":" string",
" nextHopIpAddress":" string"
}

问候, 


Msrini


For the template :- https://docs.microsoft.com/en-us/azure/templates/microsoft.network/2018-11-01/routetables/routes
there are no tags that are defined in it, however if the Azure Policy "Deny resource deployment without tags" is enabled on subscription then the above template fails to deploy since there is no tagging in it.

Code Snippet is below :-

{
"name": "string",
"type": "Microsoft.Network/routeTables/routes",
"apiVersion": "2018-11-01",
"properties": {
"addressPrefix": "string",
"nextHopType": "string",
"nextHopIpAddress": "string"
}
}

解决方案

Can you please use the below template to create Route table with tags:

{
"name": "string",
"type": "Microsoft.Network/routeTables/routes",
"apiVersion": "2018-11-01",
"tags":{
                "TagName": "TagValue"
            },
"properties": {
"addressPrefix": "string",
"nextHopType": "string",
"nextHopIpAddress": "string"
}

Regards, 

Msrini


这篇关于未包含标记时,ARM模板无法更新属性。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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