diff --git a/modules/azure/core/README.md b/modules/azure/core/README.md index 73490d153..e3639db1e 100644 --- a/modules/azure/core/README.md +++ b/modules/azure/core/README.md @@ -53,7 +53,7 @@ No Modules. | route\_config | Route configuration. Not applied to aks subnets. |
list(object({| `[]` | no | | subscription\_name | The subscriptionCommonName to use for the deploy | `string` | n/a | yes | | unique\_suffix | Unique suffix that is used in globally unique resources names | `string` | `""` | no | -| vnet\_config | Address spaces used by virtual network. |
subnet_name = string # Short name for the subnet
routes = list(object({
name = string # Name of the route
address_prefix = string # Example: 192.168.0.0/24
next_hop_type = string # VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance and None
next_hop_in_ip_address = string # Only set if next_hop_type is VirtualAppliance
}))
}))
object({| n/a | yes | +| vnet\_config | Address spaces used by virtual network. |
address_space = list(string)
subnets = list(object({
name = string
cidr = string
service_endpoints = list(string)
aks_subnet = bool
}))
})
object({| n/a | yes | ## Outputs diff --git a/modules/azure/core/network.tf b/modules/azure/core/network.tf index b2633188d..ef6405c3e 100644 --- a/modules/azure/core/network.tf +++ b/modules/azure/core/network.tf @@ -3,6 +3,7 @@ resource "azurerm_virtual_network" "this" { resource_group_name = data.azurerm_resource_group.this.name location = data.azurerm_resource_group.this.location address_space = var.vnet_config.address_space + dns_servers = var.vnet_config.dns_servers } resource "azurerm_virtual_network_peering" "this" { diff --git a/modules/azure/core/variables.tf b/modules/azure/core/variables.tf index f04addc76..625c4fadc 100644 --- a/modules/azure/core/variables.tf +++ b/modules/azure/core/variables.tf @@ -22,6 +22,7 @@ variable "vnet_config" { description = "Address spaces used by virtual network." type = object({ address_space = list(string) + dns_servers = list(string) subnets = list(object({ name = string cidr = string diff --git a/validation/azure/core/main.tf b/validation/azure/core/main.tf index e31ce10ce..a3ecebcdd 100644 --- a/validation/azure/core/main.tf +++ b/validation/azure/core/main.tf @@ -15,6 +15,7 @@ module "core" { name = "core" vnet_config = { address_space = ["10.180.0.0/16"] + dns_servers = [] subnets = [ { name = "servers"
address_space = list(string)
dns_servers = list(string)
subnets = list(object({
name = string
cidr = string
service_endpoints = list(string)
aks_subnet = bool
}))
})