Centralizing Terraform Code


We want to centralize the terraform code for creating project infrastructure in a single repository.

But we need each project (main.tf) that is divided into subfolders within the repository to be run individually.

We are capturing which of the folders is being changed during the pipeline execution, but if I upload two projects in the same commit the pipeline ends up getting lost.

Has anyone experienced this or uses a similar structure?

Currently our terraform pipeline is all on AWS:
CodeCommit → CodePipeline