Creating multiple resources of one resource type using a single terraform file with separate state file for each of the resource

I am new to terraform. Here is what I am trying to achieve and want to know if there is a simple way of doing this in terraform:

  1. Create a single terraform file (as a template) for updating/creating, say, azure app service web apps.
  2. However, we have 20+ web apps running and I really don’t want to create a separate file for each one of them.
  3. I want to use the same terraform template to perform updates to each of the web apps separately.

The problem I am facing is:

  1. When I use the same file to deploy another web app. It is using the same state file and hence replacing the previous web app with the new one.
  2. The state of all web apps are not maintained separately.

I come from the cloudformation world and this is very simple in cloudformation:

  1. I create a single cloudformation template. This is a jinja template.
  2. When we want to update app1, we render the template with values for app1 (version, tags, etc.).
  3. We provide a stack name (unique to each app) and pass the rendered template to cloudformation and cloudformation modifies the correct app (determined from the stack name)

I am looking for something similar in terraform. i am not looking to use count, for_each here because that would mean the template is updating all the applications rather than one at time.

Can someone help me how can I achieve this in terraform. Thank you in advance.