I’m curious what people would recommend here: We h...
# general
I’m curious what people would recommend here: We have a project (CI). We have 4 environments (dev, staging, prod, support). CI runs in support. We need to create a GCP service account in the support stack (we have one stack per env), but then reuse that stack in the other 3 envs so that we can grant it a role in GCP. Given that TypeScript doesn’t allow exporting inside of a conditional, what’s the best way to reference that service account? The issue is due to TS and the way Pulumi requires things to be `export`ed for it to be used in a stack reference.
@cool-egg-852 YMMV, but we use
to declare the name, do our conditional assignment by
and then export that name at the top-level, kinda eh but it works for us in our base stacks.
That’s how I’ve done it in the past, but we have multiple files (we only use
to include other files). This makes the whole system a PITA as we have to export over and over again. On top of this, we need to have files included conditionally. That’s why I was wondering if there is a better solution.