How to solve resource region dependency issue in Terraform

For example: I have two separate modules, module-us-east-1, module-us-west-2. Now the consecutivity of running is module-us-east-1 then module-us-west-2 in the same Jenkins Pipeline. But module-us-east-1 will need some resources which will be created by module-us-west-2 abviously both modules will create resource in different regions.

Any hints on how this can be accomplished? :confused:

Hi @vitaliejicol,

You mentioned having two separate modules, which in Terraform terminology usually means a single configuration with two module blocks in it. Is that what you mean, or do you instead have two separate Terraform configurations, where the “us-east-1” configuration looks up objects that were created by the “us-west-2” configuration e.g. using data sources?