错误:模块不支持depends_on

时间:2021-01-11 06:58:02

标签: azure terraform

#Get existing subnet properties
module "subnet" {
  #source = "git::git@bitbucket.org:exium-c2/azure-registery.git/az-sub"
  source         = "C:\\Users\\harip\\azure-registery\\az-sub"
  subnet_prefix4 = var.subnet_prefix4
  subnet_prefix6 = var.subnet_prefix6
  rg             = var.rg-name
  location       = var.rg-location
  vnet-name      = data.azurerm_virtual_network.vnet.name
  routeipv4      = data.azurerm_route_table.routeipv4.id
  routeipv6      = data.azurerm_route_table.routeipv6.id
  mgmt-sg-id     = data.azurerm_network_security_group.sg.id
  nwu-sg-id      = data.azurerm_network_security_group.sg1.id


}
module "nics" {
  #source = "git::git@bitbucket.org:exium-c2/azure-registery.git/az-nic"
  source = "C:\\Users\\harip\\azure-registery\\az-nic"
  #nic-name    = var.nic-name
  rg-name     = var.rg-name
  rg-location = var.rg-location
  #count= "${length(var.subnetwork-subnetid)}"
  subnetwork-subnetid  = module.subnet.subnetwork-subnetid
  subnetwork6-subnetid = module.subnet.subnetwork6-subnetid
  depends_on = [ module.subnet.subnetwork,module.subnet.subnetwork6 ]

}
module "fpm" {
  #source = "git::git@bitbucket.org:exium-c2/azure-registery.git/az-compute-fpm"
  source = "C:\\Users\\harip\\azure-registery\\az-compute-fpm"
  #count       = "${length(var.nic1-id)}"
  vm-name     = var.vm-name
  size        = var.size
  user-name   = var.user-name
  rg-name     = var.rg-name
  rg-location = var.rg-location
  nic1-id     = module.nics.nic1-id
  nic2-id     = module.nics.nic2-id

}

计划创建多个实例和基于子网和网卡,因此计划使用具有“依赖”功能的模块。 错误: 错误:模块不支持依赖 请在这方面提供帮助。感谢提前。

0 个答案:

没有答案