Create an AGIC in the AKS Node Resource Group

The AKS node resource group cannot already exist before creating the AKS cluster, so to create an Application Gateway in the same node resource group means that the Application Gateway needs to be created after the AKS cluster. But the ingress application gateway add-on is specified in the AKS cluster, which makes a circular dependency:

resource "azurerm_kubernetes_cluster" "example" {
    ...
    ingress_application_gateway {
      enabled    = true
      gateway_id = azurerm_application_gateway.example.id
    }
}

resource "azurerm_application_gateway" "example" {
    ...
    resource_group_name = azurerm_kubernetes_cluster.example.node_resource_group
}

Can someone please tell me how to create an AGIC in the AKS node resource group? Thanks a lot