I need some help in setting up some Azure infrastructure in Terraform.
I have app service A which is in vnetA in subnetA, and app service B in vnetB and subnetB.
AppA, vnetA, and subnetA were created manually a long time ago, and B resources I have created myself in Terraform.
I have added a virtual network peering between the two vnets, but when calling appB from appA I still get 403.

resource "azurerm_subnet" "subnetB" {
  name                 = "subnetB"
  resource_group_name  = "rgB"
  virtual_network_name = "vnetB"
  address_prefixes     = [cidrsubnet(azurerm_virtual_network.vnetB.address_space[0], 2, 1)]

  delegation {
    name = "appServiceDelegation"
    service_delegation {
        name    = "Microsoft.Web/serverFarms"
        actions = ["Microsoft.Network/virtualNetworks/subnets/action"]
    }
  }  

  service_endpoints =  ["Microsoft.Web"]
}

What am I missing?

I have gone through similar questions, in subnetB I have added both app service delegation and service endpoints as was advised (here) but this did not fix the issue.

New contributor

sobrod is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.