Terraform build in a mono repo

I have a Terrafrom GitHub repository. It is set up like this
/globals is my base setup to setup the GCP folders and projects
/network/non-prod is for the VPC for the development infrastructure
/network/staging is for the VPC for the staging infrastructure
/network/prod is for the VPC for the production infrastructure
/logging/[non-prod, staging, prod] for logging
/monitoring/non-prod, staging, prod] for monitoring
. . . and a lot more

Each directory is an independent terraform build and has its own state file.

I am trying to use the path-filtering-orb here is my configuration:

version: 2.1
setup: true
orbs:
  path-filtering: circleci/path-filtering@0.1.1
workflows:
  always-run:
    jobs:
      - path-filtering/filter:
          name: check-updated-files
          base-revision: main
          config-path: .circleci/continue.yml
          mapping: |
            global.* run-global-job true
            network/non-prod/.* run-network-non-prod-job true
            network/prod/.* run-network-prod-job true
            network/staging/.* run-network-staging-job true
            modules/gcp-project

In my continuation config I have a job that builds terraform it uses circleci/terraform@3.0.0 to do it’s build. Here is the job that builds Terraform:

workflows:
  terraform-global:
    when: << pipeline.parameters.run-global-job >>
    jobs:
      - set-gcp-credentials
      - validate-gcp-credentials
      - terraform-lint
      - terraform-validate:
          requires:
            - terraform-lint
            - set-gcp-credentials
            - validate-gcp-credentials
          context:
            - Terraform
  terraform-network-nonprod:
    when: << pipeline.parameters.run-network-non-prod-job >>
    jobs:
      - set-gcp-credentials
      - validate-gcp-credentials
      - terraform-lint
      - terraform-validate:
          requires:
            - terraform-lint
            - set-gcp-credentials
            - validate-gcp-credentials
          context:
                - Terraform

I don’t want to duplicate the terraform-validate job for each individual piece of infrastructure.
What I want to do is to be able to pass in the directory that the terraform files are located and then run terraform on the files in that directory. If terraform files change in multiple directories then I want to process all of the files that changed.
I have only been using CircleCi for a month. We just switched from Jenkins and this was easy to do in Jenkins. I assume it is just my lack of knowledge or CircleCi.

Thanks for your help.

I posted my workflow where my terraform should have been. Her is the code to do the terraform builds.

  terraform-validate:
    docker:
      - image: cimg/base:2022.01
    environment:
      GOOGLE_APPLICATION_CREDENTIALS: "/<< pipeline.parameters.google-credentials-path >>/<< pipeline.parameters.google-credentials-file >>"
    resource_class: small
    steps:
      - add_ssh_keys:
          fingerprints:
            - "a8:...:0f"
      - attach_workspace:
          at: "/<< pipeline.parameters.google-credentials-path >>"
      - checkout
      - terraform/install:
          arch: amd64
          os: linux
          terraform_version: "1.1.3"
      - terraform/fmt:
          path: $some parameter of environment variable
      - terraform/init:
          path: $some parameter of environment variable
      - terraform/validate:
          path: $some parameter of environment variable
      - terraform/plan:
          path: $some parameter of environment variable
      - when:
          condition:
            equal: [ main, << pipeline.git.branch >> ]
          steps:
            - terraform/apply:
                path: $some parameter of environment variable