Open timur-khadimullin opened 2 months ago
@timur-khadimullin have you been able to create Vnets which work with other Azure services. I am asking because I wonder if this is an issue with the Azure networking Terraform module?
@simonjj we use Azure/avm-res-network-virtualnetwork
as part of LZ vending code (that is mostly based on Azure/terraform-azurerm-lz-vending
). I can confirm we were able to successfully stand up AKS service integrated into subnet using the following code:
module "avm-res-network-virtualnetwork" {
source = "Azure/avm-res-network-virtualnetwork/azurerm"
address_space = ["10.51.16.0/20"]
location = azurerm_resource_group.rg.location
name = module.naming.virtual_network.name
resource_group_name = azurerm_resource_group.rg.name
subnets = {
"aks_default_node_pool_subnet" = {
name = "${var.project}-aks-subnet"
address_prefixes = ["10.51.16.0/23"]
private_link_service_network_policies_enabled = false
}
}
}
resource "azurerm_kubernetes_cluster" "example" {
name = module.naming.kubernetes_cluster.name_unique
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
// abbreviated for readability
default_node_pool {
name = "default"
// abbreviated for readability
vnet_subnet_id = module.avm-res-network-virtualnetwork.subnets["aks_default_node_pool_subnet"].resource.id
}
// abbreviated for readability
}
that said, I have just got response on the other issue I raised with AVM module repo and it seems they have enabled a workaround by exposing addressPrefix
property: https://github.com/Azure/terraform-azurerm-avm-res-network-virtualnetwork/issues/101. This will work for us, but I think the root cause must have to do with the difference between how AKS and ACA integrate into subnets
This issue is a: (mark with an x)
Issue description
I get the following error message from Terraform:
Steps to reproduce
run the following terraform code:
Expected behavior both environments are created successfully
Actual behavior one environment gets provisioned while the other one fails with the
ManagedEnvironmentInvalidNetworkConfiguration
errorScreenshots
upon inspecting the two provisioned subnets with
az network vnet subnet show
, I see a few differences but one particularly caught my eye:Additional context