Azure ';订阅ID';属性不支持在订阅作用域的部署中进行嵌套部署

Azure ';订阅ID';属性不支持在订阅作用域的部署中进行嵌套部署,azure,azure-resource-manager,azure-servicebus-subscriptions,Azure,Azure Resource Manager,Azure Servicebus Subscriptions,我正在尝试使用Azure Blueprint工件中的嵌套模板将主题部署到Azure服务总线。此总线是在与蓝图其余部分不同的订阅中创建的。我一直在关注这篇文章: 我的工件定义为: { "kind": "template", "properties": { "template": { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",

我正在尝试使用Azure Blueprint工件中的嵌套模板将主题部署到Azure服务总线。此总线是在与蓝图其余部分不同的订阅中创建的。我一直在关注这篇文章:

我的工件定义为:

{
"kind": "template",
"properties": {
    "template": {
        "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
        "contentVersion": "1.0.0.0",
        "parameters": {
            "servicebusNamespace": {
                "type": "string"
            },
            "topicName": {
                "type": "string"
            }
        },
        "resources": [
            {
                "apiVersion": "2019-05-01",
                "name": "nestedTemplate",
                "type": "Microsoft.Resources/deployments",
                "resourceGroup": "myResourceGroup",
                "subscriptionId": "mySubscriptionId",
                "properties": {
                    "mode": "Incremental",
                    "template": {
                        "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
                        "contentVersion": "1.0.0.0",
                        "parameters": {},
                        "variables": {},
                        "resources": [
                            {
                                "type": "Microsoft.ServiceBus/namespaces/topics",
                                "apiVersion": "2017-04-01",
                                "name": "[concat(parameters('servicebusNamespace'), '/', parameters('topicName'))]",
                                "location": "North Europe",
                                "properties": {
                                    "defaultMessageTimeToLive": "P14D",
                                    "maxSizeInMegabytes": 1024,
                                    "requiresDuplicateDetection": false,
                                    "duplicateDetectionHistoryTimeWindow": "PT10M",
                                    "enableBatchedOperations": true,
                                    "status": "Active",
                                    "supportOrdering": true,
                                    "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S",
                                    "enablePartitioning": false,
                                    "enableExpress": false
                                }
                            }
                        ]
                    },
                    "parameters": {}
                }
            }
        ]
    },
    "parameters": {
        "servicebusNamespace": {
            "value": "[parameters('BP_servicebusNamespace')]"
        },
        "topicName": {
            "value": "[parameters('BP_topicName')]"
        }
    }
},
"type": "Microsoft.Blueprint/blueprints/artifacts"
}

使用导入AzBlueprintWithArtifact-Name$blueprintName-ManagementGroupId$ManagementGroupId-InputPath$blueprintFolder-Force导入蓝图时 我收到以下错误:

“错误!此项目无效。错误:'第'13'行和第'5'列的模板资源'nestedTemplate'无效。”。
订阅范围内的部署不支持“SubscriptionId”属性。有关用法的详细信息,请参阅。“

错误会告诉您那里发生了什么,您不能对订阅范围内的部署使用
SubscriptionId
属性。尝试将其转换为链接模板,这可能会起作用(或资源组级别部署中的链接模板)

我正在尝试实现类似的功能:我不知道我的代码片段与此代码片段有什么不同,只是它嵌入了blueprint工件中。也许这就是答案,该代码片段确实有效,但由于某些原因,blueprint启动的部署不起作用(我想你不应该在其他订阅中做这些事情?我真的不知道)