使用导出的 ARM 创建服务总线 - 不允许 $Default 规则的 Create/Update
Creating Service Bus with exported ARM - Create/Update of a $Default rule is not allowed
我在 Azure 门户中创建了 "Standard" 层服务总线。我也创建了主题和订阅。
我导出了 ARM 模板。
我使用 PowerShell 执行以使用 ARM 重新创建服务总线。我已经改名了。
我确实成功地为 Azure 创建了服务总线,但我想知道我是否遇到了这些错误:
我应该删除像“"type": "Microsoft.ServiceBus/namespaces/networkRuleSets"”这样的规则吗?
哪些自动添加到 ARM 的导出?
错误:
New-AzResourceGroupDeployment : 10.02.54 - Resource
Microsoft.ServiceBus/namespaces/topics/subscriptions/rules
'digiservicebusdev/newprofiletopic/newprofilesubscription/$Default' fa
iled with message '{
"error": {
"message": "Create/Update of a $Default rule is not allowed. CorrelationId: 6e135ad8-1bf2-4a33-b088-
ef6003c025be",
"code": "BadRequest"
}
}'
At C:\Azure\ServiceBusARM\SBARM.ps1:12 char:1
+ New-AzResourceGroupDeployment `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId :
Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
New-AzResourceGroupDeployment : 10.02.55 - Resource Microsoft.ServiceBus/namespaces/networkRuleSet
s 'servicebusdev/default' failed with message '{
"error": {
"message": "Network Rules are available only on a Premium Messaging namespace. CorrelationId:
11135ad8-1bf2-4a33-b088-ef6003c025be",
"code": "BadRequest"
}
}'
At C:\Azure\ServiceBusARM\SBARM.ps1:12 char:1
+ New-AzResourceGroupDeployment `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId :
Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
我在我的网站上测试过,可以重现你的问题。
Each newly created topic subscription has an initial default subscription rule. If you don't explicitly specify a filter condition for the rule, the applied filter is the true filter that enables all messages to be selected into the subscription. The default rule has no associated annotation action.
我怀疑这将涉及服务器端更改,不创建默认规则,因此推迟。更详细的可以参考这个issue.
Should I remove rules like ""type": "Microsoft.ServiceBus/namespaces/networkRuleSets"," which were automatically added to Export of ARM?
是的,当您想要在标准层中部署服务总线时,需要从 ARM 模板中删除(自动生成的)networkRuleSets 对象。
我在 Azure 门户中创建了 "Standard" 层服务总线。我也创建了主题和订阅。 我导出了 ARM 模板。
我使用 PowerShell 执行以使用 ARM 重新创建服务总线。我已经改名了。 我确实成功地为 Azure 创建了服务总线,但我想知道我是否遇到了这些错误:
我应该删除像“"type": "Microsoft.ServiceBus/namespaces/networkRuleSets"”这样的规则吗? 哪些自动添加到 ARM 的导出?
错误:
New-AzResourceGroupDeployment : 10.02.54 - Resource
Microsoft.ServiceBus/namespaces/topics/subscriptions/rules
'digiservicebusdev/newprofiletopic/newprofilesubscription/$Default' fa
iled with message '{
"error": {
"message": "Create/Update of a $Default rule is not allowed. CorrelationId: 6e135ad8-1bf2-4a33-b088-
ef6003c025be",
"code": "BadRequest"
}
}'
At C:\Azure\ServiceBusARM\SBARM.ps1:12 char:1
+ New-AzResourceGroupDeployment `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId :
Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
New-AzResourceGroupDeployment : 10.02.55 - Resource Microsoft.ServiceBus/namespaces/networkRuleSet
s 'servicebusdev/default' failed with message '{
"error": {
"message": "Network Rules are available only on a Premium Messaging namespace. CorrelationId:
11135ad8-1bf2-4a33-b088-ef6003c025be",
"code": "BadRequest"
}
}'
At C:\Azure\ServiceBusARM\SBARM.ps1:12 char:1
+ New-AzResourceGroupDeployment `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId :
Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
我在我的网站上测试过,可以重现你的问题。
Each newly created topic subscription has an initial default subscription rule. If you don't explicitly specify a filter condition for the rule, the applied filter is the true filter that enables all messages to be selected into the subscription. The default rule has no associated annotation action.
我怀疑这将涉及服务器端更改,不创建默认规则,因此推迟。更详细的可以参考这个issue.
Should I remove rules like ""type": "Microsoft.ServiceBus/namespaces/networkRuleSets"," which were automatically added to Export of ARM?
是的,当您想要在标准层中部署服务总线时,需要从 ARM 模板中删除(自动生成的)networkRuleSets 对象。