depends on azurerm_virtual_network_dns_servers resource
This commit is contained in:
Родитель
de08db6f0f
Коммит
8a064aea73
|
@ -192,14 +192,12 @@ Originally created by [Eugene Chuvyrov](http://github.com/echuvyrov)
|
|||
|------|---------|
|
||||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.2 |
|
||||
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >= 3.11, < 4.0 |
|
||||
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.12.1, < 1.0 |
|
||||
|
||||
## Providers
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| <a name="provider_azurerm"></a> [azurerm](#provider\_azurerm) | >= 3.11, < 4.0 |
|
||||
| <a name="provider_time"></a> [time](#provider\_time) | >= 0.12.1, < 1.0 |
|
||||
|
||||
## Modules
|
||||
|
||||
|
@ -215,7 +213,6 @@ No modules.
|
|||
| [azurerm_subnet_route_table_association.vnet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet_route_table_association) | resource |
|
||||
| [azurerm_virtual_network.vnet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network) | resource |
|
||||
| [azurerm_virtual_network_dns_servers.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network_dns_servers) | resource |
|
||||
| [time_sleep.wait_1_sec](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep) | resource |
|
||||
|
||||
## Inputs
|
||||
|
||||
|
|
12
main.tf
12
main.tf
|
@ -64,6 +64,8 @@ resource "azurerm_subnet" "subnet_count" {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
depends_on = [azurerm_virtual_network_dns_servers.this]
|
||||
}
|
||||
|
||||
resource "azurerm_subnet" "subnet_for_each" {
|
||||
|
@ -89,6 +91,8 @@ resource "azurerm_subnet" "subnet_for_each" {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
depends_on = [azurerm_virtual_network_dns_servers.this]
|
||||
}
|
||||
|
||||
locals {
|
||||
|
@ -99,18 +103,11 @@ locals {
|
|||
}
|
||||
}
|
||||
|
||||
resource "time_sleep" "wait" {
|
||||
create_duration = "10s"
|
||||
destroy_duration = "10s"
|
||||
depends_on = [azurerm_subnet.subnet_for_each, azurerm_subnet.subnet_count]
|
||||
}
|
||||
|
||||
resource "azurerm_subnet_network_security_group_association" "vnet" {
|
||||
for_each = var.nsg_ids
|
||||
|
||||
network_security_group_id = each.value
|
||||
subnet_id = local.azurerm_subnets_name_id_map[each.key]
|
||||
depends_on = [time_sleep.wait]
|
||||
}
|
||||
|
||||
resource "azurerm_subnet_route_table_association" "vnet" {
|
||||
|
@ -118,5 +115,4 @@ resource "azurerm_subnet_route_table_association" "vnet" {
|
|||
|
||||
route_table_id = each.value
|
||||
subnet_id = local.azurerm_subnets_name_id_map[each.key]
|
||||
depends_on = [time_sleep.wait]
|
||||
}
|
||||
|
|
|
@ -6,9 +6,5 @@ terraform {
|
|||
source = "hashicorp/azurerm"
|
||||
version = ">= 3.11, < 4.0"
|
||||
}
|
||||
time = {
|
||||
source = "hashicorp/time"
|
||||
version = ">= 0.12.1, < 1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче