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       = [""]

  location            = "eastus"

  resource_group_name = "General"


# Create subnet

resource "azurerm_subnet" "subnet" {

  name                 = "default"

  resource_group_name  = "General"

  virtual_network_name =

  address_prefix       = ""


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

Greetings and thank you very much,