Terraform 1.3.0 scenarios on Azure Kubernetes Cluster Node Pool with Custom VNET Integration
I recently switched to I've been working on this all day and I'm getting frustrated with Can someone help me understand I'm working with an scenario when trying to create an Azure Kubernetes Service (AKS) cluster with a custom VNET integration using Terraform 1.3.0. I am trying to configure the node pool to use a specific subnet from my VNET, but I'm getting the following behavior during the `terraform apply` step: ``` behavior: behavior creating Kubernetes cluster: Failed creating agent pool: Agent pool "my-node-pool" could not be created. "subnetID" specified does not exist or you don't have permission to access it. ``` I've ensured that the subnet exists in the specified VNET, and I have appropriate permissions to access it. Here's the relevant portion of my Terraform code for setting up the AKS cluster: ```hcl provider "azurerm" { features {} } resource "azurerm_resource_group" "rg" { name = "my-resource-group" location = "East US" } resource "azurerm_virtual_network" "vnet" { name = "my-vnet" address_space = ["10.0.0.0/16"] location = azurerm_resource_group.rg.location resource_group_name = azurerm_resource_group.rg.name } resource "azurerm_subnet" "subnet" { name = "my-subnet" resource_group_name = azurerm_resource_group.rg.name virtual_network_name = azurerm_virtual_network.vnet.name address_prefixes = ["10.0.1.0/24"] } resource "azurerm_kubernetes_cluster" "aks" { name = "my-aks-cluster" location = azurerm_resource_group.rg.location resource_group_name = azurerm_resource_group.rg.name default_node_pool { name = "my-node-pool" node_count = 3 vm_size = "Standard_DS2_v2" vnet_subnet_id = azurerm_subnet.subnet.id # This is where I'm getting the behavior } } ``` I've also double-checked the subnet ID using the Azure portal, and it seems correct. I’ve tried running `terraform refresh` just to ensure the state file is in sync, but the behavior continues. Any insights on what might be going wrong or additional debug steps I can take would be greatly appreciated! Any advice would be much appreciated. For context: I'm using Hcl on Ubuntu 20.04. Cheers for any assistance! Any ideas how to fix this?