Use existing resources for new instances Azure

Hi all

I want to use a subnet that I have, to be able to add by terraform to new Azure instances.

I have this, but it tells me that the resource already exists in the subscription

# Create virtual network

resource "azurerm_virtual_network" "vnet" {

  name                = "redes"

  address_space       = ["10.0.0.0/16"]

  location            = "eastus"

  resource_group_name = "General"

}

# Create subnet

resource "azurerm_subnet" "subnet" {

  name                 = "default"

  resource_group_name  = "General"

  virtual_network_name = azurerm_virtual_network.vnet.name

  address_prefix       = "10.0.2.0/24"

}

I would like to know how to assign a Vnet and subnet that I already have.

Greetings and thank you very much,