Import a provider from a project folder

I am reengineering a terraform project updating it to the latest version available. I would like to create a directory division in order to divide the infrastructure creation from other customization operations, I realized that the import of the same provider “hashicorp / azurerm” is always reported in the various main scripts contained in the project.
With a view to optimization I would like to create a ts file (commonProviders.ts) with only the “hashicorp / azurerm” provider and then import it into all the various main scripts of the project indicating the path in the project, on the documentation I didn’t seem to see anything, it’s possible to do it? Has anyone already encountered a similar situation?

Hi @Nopesound,

When you say “a .ts file”, are you talking about Typescript source code? Or did you intend to say “a .tf file” (the suffix used for Terraform language files)?

If you mean Typescript then I’d like to hear more about your goal since it isn’t common to use Typescript with Terraform unless you are intending to use CDK for Terraform.

sorry, i meant a tf file.