【发布时间】:2021-10-14 10:25:22
【问题描述】:
我正在尝试创建一个二头肌模块,该模块将部署数据工厂和托管 vnet。这是我所拥有的:
param dfName string
param sqlId string
resource df 'Microsoft.DataFactory/factories@2018-06-01' = {
name: dfName
location: resourceGroup().location
identity: {
type: 'SystemAssigned'
}
}
resource integrationRuntime 'Microsoft.DataFactory/factories/integrationRuntimes@2018-06-01' = {
name: '${dfName}/managedVnetIr'
properties: {
type: 'Managed'
typeProperties: {
computeProperties: {
location: 'AutoResolve'
dataFlowProperties: {
computeType: 'General'
coreCount: 8
timeToLive: 0
}
}
}
}
dependsOn: [
df
]
}
resource managedVnet 'Microsoft.DataFactory/factories/managedVirtualNetworks@2018-06-01' = {
name: '${dfName}/vnet'
properties: {
}
dependsOn: [
integrationRuntime
]
}
resource managedPrivateEndpoint 'Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints@2018-06-01' = {
name: '${dfName}/vnet/pe'
properties: {
privateLinkResourceId:sqlId
groupId: 'sql'
}
dependsOn: [
managedVnet
]
}
output dfId string = df.identity.principalId
运行此模块时,出现以下错误:
“状态”:“失败”, “错误”: { "code": "ResourceNotFound", “消息”:“找不到资源。ResourceId:'/subscriptions/8210b2ab-404f-40a5-baba-1cde6d89c670/resourceGroups/rg-contactcentre-dev-001/providers/Microsoft.DataFactory/factories/df-ccsurvey-dev-001 /managedvirtualnetworks/vnet'。” }
我还尝试了以下方法(基于 AnsumanBal-MT 的回答)
param dfName string
param sqlId string
param vnetName string
resource df 'Microsoft.DataFactory/factories@2018-06-01' = {
name: dfName
location: resourceGroup().location
identity: {
type: 'SystemAssigned'
}
}
resource integrationRuntime 'Microsoft.DataFactory/factories/integrationRuntimes@2018-06-01' = {
parent: df
name: '${dfName}-managedVnetIr'
properties: {
type: 'Managed'
typeProperties: {
computeProperties: {
location: 'AutoResolve'
dataFlowProperties: {
computeType: 'General'
coreCount: 8
timeToLive: 0
}
}
}
}
}
resource managedVnet 'Microsoft.DataFactory/factories/managedVirtualNetworks@2018-06-01' = {
parent:df
name: vnetName
properties: {
}
dependsOn: [
integrationRuntime
]
}
resource managedPrivateEndpoint 'Microsoft.DataFactory/factories/managedVirtualNetworks/managedPrivateEndpoints@2018-06-01' = {
parent:managedVnet
name: '${vnetName}-sql-pe'
properties: {
privateLinkResourceId:sqlId
groupId: 'sql'
}
dependsOn: [
managedVnet
]
}
output dfId string = df.identity.principalId
但这会产生以下错误:
{ “状态”:“失败”, “错误”: { "code": "ResourceDeploymentFailure", "message": "资源操作完成,终端配置状态为'失败'。" } }
谁能发现我做错了什么或者请指导我找到一个工作示例?
【问题讨论】:
-
你好@Rob Bowman,我测试了 SQL 数据库并添加了一个更新来回答,如果可行,请告诉我..
-
你好@Rob Bowman,我根据你的场景和你需要的配置更新了代码。我已经对其进行了测试,并且已成功部署。请使用我在更新:2 部分中提供的整个代码。它将创建一个 vnet,然后是 sql server 和 adf,最后在 adf 中为 sql 管理 privateendpoint。
标签: azure-data-factory azure-resource-manager azure-bicep