Using provider in modules

Hello,
can you help me what I’m doing wrong please?

I have defined providers in config/terraform/terraform.tf

terraform {
  required_version = ">= 0.14"
  required_providers {
    azure = {
      version = "=2.46.1"
    }
    acme = {
      source = "vancluever/acme"
      version = ">=2.2.0"
    }
  }
}

but TS/TF init complains about that, so I run terraform providers in .cache directory and see folowing:

terraform providers

Providers required by configuration:
.
├── provider[registry.terraform.io/hashicorp/azure] < 2.46.1
├── provider[registry.terraform.io/vancluever/acme] >= 2.2.0
├── provider[registry.terraform.io/hashicorp/azurerm]
└── module.my_own_module
    ├── provider[registry.terraform.io/hashicorp/azurerm]
    ├── provider[registry.terraform.io/hashicorp/random]
    ├── provider[registry.terraform.io/hashicorp/acme]
    └── provider[registry.terraform.io/hashicorp/template]

Providers required by state:

    provider[registry.terraform.io/hashicorp/azurerm]

    provider[registry.terraform.io/hashicorp/random]

    provider[registry.terraform.io/hashicorp/template]

I thought this TF config is used in every module (and stack), can you point me to the proper config please?

Unsure :face_with_monocle: Wondering what the provider.tf in the .terraspace-cache folder looks like. IE: .terraspace-cache/us-west-2/dev/stacks/demo/provider.tf

In case there’s an existing app/stacks/STACK/provider.tf in the stack folder that’s taking precedence over the config/terraform/provider.tf Docs: