# Configure the Azure Providerprovider "azurerm" {}
module "storage" { source = "modules/storage"
#depends_on = ["${azurerm_resource_group.RG01.name}"] storageResourceGroupName = "${var.storageResourceGroupName}" location = "${var.location}" vhdStorageName = "${var.vhdStorageName}" vhdStorageSku = "${var.vhdStorageSku}" vhdStorageReplicationType = "${var.vhdStorageReplicationType}" ScriptReplicationType = "${var.ScriptReplicationType}" scriptStorageName = "${var.scriptStorageName}" scriptStorageSku = "${var.scriptStorageSku}" diagnosticsStorageName = "${var.diagnosticsStorageName}" diagnosticsStorageSku = "${var.diagnosticsStorageSku}" DiagnosticReplicationType = "${var.DiagnosticReplicationType}"}
module "network" { source = "modules/network" networkResourceGroupName = "${var.networkResourceGroupName}" VNetName = "${var.VNetName}" NetworkCIDR = "${var.NetworkCIDR}" SubnetGatewayName = "${var.SubnetGatewayName}" SubnetGatewayCIDR = "${var.SubnetGatewayCIDR}" applicationGatewayGreenSubnetName = "${var.applicationGatewayGreenSubnetName}" applicationGatewaySubnetCidrGreen = "${var.applicationGatewaySubnetCidrGreen}" applicationGatewayBlueSubnetName = "${var.applicationGatewayBlueSubnetName}" applicationGatewaySubnetCidrBlue = "${var.applicationGatewaySubnetCidrBlue}" jumpboxSubnetName = "${var.jumpboxSubnetName}" jumpboxSubnetCidr = "${var.jumpboxSubnetCidr}" scaleSetBlueSubnetName = "${var.scaleSetBlueSubnetName}" scaleSetSubnetCidrBlue = "${var.scaleSetSubnetCidrBlue}" scaleSetGreenSubnetName = "${var.scaleSetGreenSubnetName}" scaleSetSubnetCidrGreen = "${var.scaleSetSubnetCidrGreen}"}
resource "azurerm_resource_group" "NetworkResourceGroup01" { name = "${var.networkResourceGroupName}" location = "${var.location}"
tags { environment = "" }}
resource "azurerm_virtual_network" "vnet" { name = "${var.VNetName}" address_space = "${var.NetworkCIDR}" location = "${var.location}" resource_group_name = "${var.networkResourceGroupName}" depends_on = ["azurerm_resource_group.NetworkResourceGroup01"]
subnet { name = "${var.SubnetGatewayName}" address_prefix = "${var.SubnetGatewayCIDR}" }
subnet { name = "${var.applicationGatewayGreenSubnetName}" address_prefix = "${var.applicationGatewaySubnetCidrGreen}" }
subnet { name = "${var.applicationGatewayBlueSubnetName}" address_prefix = "${var.applicationGatewaySubnetCidrBlue}" }
subnet { name = "${var.jumpboxSubnetName}" address_prefix = "${var.jumpboxSubnetCidr}" }
subnet { name = "${var.scaleSetGreenSubnetName}" address_prefix = "${var.scaleSetSubnetCidrGreen}" }
subnet { name = "${var.scaleSetBlueSubnetName}" address_prefix = "${var.scaleSetSubnetCidrBlue}" }}
resource "azurerm_resource_group" "StorageResourceGroup01" { name = "${var.storageResourceGroupName}" location = "${var.location}"
tags { environment = "" }}
resource "azurerm_storage_account" "VHDStorageAccount" { name = "${var.vhdStorageName}" resource_group_name = "${var.storageResourceGroupName}" location = "${var.location}" account_tier = "${var.vhdStorageSku}" account_replication_type = "${var.vhdStorageReplicationType}" depends_on = ["azurerm_resource_group.StorageResourceGroup01"]
#depends_on = ["${var.depends_on}"]}
resource "azurerm_storage_account" "ScriptStorageAccount" { name = "${var.scriptStorageName}" resource_group_name = "${var.storageResourceGroupName}" location = "${var.location}" account_tier = "${var.scriptStorageSku}" account_replication_type = "${var.ScriptReplicationType}"
depends_on = ["azurerm_resource_group.StorageResourceGroup01"]}
resource "azurerm_storage_account" "DiagnosticStorageAccount" { name = "${var.diagnosticsStorageName}" resource_group_name = "${var.storageResourceGroupName}" location = "${var.location}" account_tier = "${var.diagnosticsStorageSku}" account_replication_type = "${var.DiagnosticReplicationType}" depends_on = ["azurerm_resource_group.StorageResourceGroup01"]
#depends_on = ["${var.depends_on}"]}
* azurerm_virtual_network.vnet: Error Creating/Updating Virtual Network "PSandersTestNet01" (Resource Group "NetworkTest"): network.VirtualNetworksClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceGroupNotFound" Message="Resource group 'NetworkTest' could not be found."
It is being ignored or silently failingDepends on doesn't work with modules. It only works on resources that are all in the same scope. So, both what is depended on and what needs it would need to be in the same module.
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/536f18af-d922-44ed-a07e-38402643a3eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CACiZgYZfXc_zrXPcBdiC5WVoC8pLVqYKqDEmPQ24X3a%2BbZZreg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
The information contained in this e-mail may be confidential. It has been sent for the sole use of the intended recipient(s). If the reader of this message is not an intended recipient, you are hereby notified that any unauthorized review, use, disclosure, dissemination, distribution or copying of this communication, or any of its contents, is strictly prohibited. If you have received it by mistake please let us know by e-mail immediately and delete it from your system. Many thanks.
La información contenida en este mensaje puede ser confidencial. Ha sido enviada para el uso exclusivo del destinatario(s) previsto. Si el lector de este mensaje no fuera el destinatario previsto, por el presente queda Ud. notificado que cualquier lectura, uso, publicación, diseminación, distribución o copiado de esta comunicación o su contenido está estrictamente prohibido. En caso de que Ud. hubiera recibido este mensaje por error le agradeceremos notificarnos por e-mail inmediatamente y eliminarlo de su sistema. Muchas gracias.