Execution order/Dependency between separate TF remote states

We have multiple TF configurations completely decoupled, with each one of them having its own state stored in an S3. We are also using terraform_remote_state to fetch the necessary outputs between these configurations. We are using CI/CD for parallel executions of these configurations.

The challenge arises when one of these configurations needs to initially execute first in order so that other configurations are able to read from this specific TF state and successfully apply themselves.
Right now we are finding a work-around by manually controlling the execution order and by use of commands such as

“terraform -target module.something”

We are also aware of the 0.12 introduction of “depends_on” for inputs and outputs but not sure how can that help in cross-state dependencies.

Any suggestions here? What are our alternatives?

Code Snippet looks like this:

module “firstchild” {
source = “github.com/modules.git//firstchild
}

terraform {
backend “s3” {
bucket = “pikachu101”
key = “xxx/terraform.tfstate”
region = “us-east-1”
}
}

and then the other configurations use data provider:

module “secondchild” {
source = “github.com/modules.git//secondchild

vpc_id = data.terraform_remote_state.firstchild.vpc_id
}

terraform {
backend “s3” {
bucket = “pikachu101”
key = “yyy/terraform.tfstate”
region = “us-east-1”
}
}

data “terraform_remote_state” “xxx” {
backend = “s3”
config = {
bucket = “pikachu101”
key = “xxx/terraform.tfstate”
region = “us-east-1”
}
}

Again, the main issue is that these configs are executed through pipelines simultaneously, thus causing one config not able to read from the other due to themselves still being in a plan/apply phase.