【发布时间】:2021-05-06 02:49:56
【问题描述】:
由于某种原因,get-azpolicyalias 将这些别名报告为可用,但 Azure 策略无法识别它们:
Microsoft.Cache/redis/privateEndpointConnections/privateEndpoint
Microsoft.Cache/redis/privateEndpointConnections/privateEndpoint.id
Microsoft.Cache/redis/privateEndpointConnections/privateLinkServiceConnectionState
Microsoft.Cache/redis/privateEndpointConnections/privateLinkServiceConnectionState.status Microsoft.Cache/redis/privateEndpointConnections/privateLinkServiceConnectionState.description Microsoft.Cache/redis/privateEndpointConnections/privateLinkServiceConnectionState.actionsRequired
Microsoft.Cache/redis/privateEndpointConnections/provisioningStateas
因此,当我运行我的代码时,我收到一条错误消息,指出别名不存在:
策略规则的“字段”属性“Microsoft.Cache/redis/privateEndpointConnections[]”在提供程序“Microsoft.Cache”和资源类型下不作为别名存在'redis'。*
policy_rule: >
{
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Cache/redis"
},
{
"count": {
"field": "Microsoft.Cache/redis/privateEndpointConnections[*]"
},
"equals": 0
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
}`
【问题讨论】:
标签: azure caching redis azure-devops terraform