Hello, I am planning to deploy a staging environment that will also be reusing some dev environment stacks. For example, I will be deploying a staging AWS RDS cluster using dev environment AWS VPC (rds stack is dependent on vpc stack via output function in tfvars).
I tried using TS_EXTRA=stg (which would be using dev-stg.tfvars), but it errors out on missing output variables from the dev environment required. Wondering if theres a workaround on using output of a stack from a different environment? Thanks!
Edit:
My current workaround is to run
aws s3 sync <vpc state from dev s3 bucket> <staging s3 bucket vpc state directory>
in a stack hook after("apply", execute: "...")
, which will copy the state to staging environment and consequently be able to read the outputs via TS_ENV=stg
as well