'Managing multiple environments with overlapping infrastructure in Terraform

We have multiple testing environments, managed via Terraform using distinct *.tfvars files. We'd like to combine our test environment databases into a single RDS instance.

Should we spin off the RDS instance, and everything it relies on, into a separate Terraform environment/config that the test environment can depend on, either via remote state or data blocks? It looks like the obvious way, but I'm hoping there's a simpler approach.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source