Hey there, that's pretty much it. I create workspa...
# automation-api
Hey there, that's pretty much it. I create workspaces with various cloud platforms in my main stack and export e.g. api keys, then need to configure the providers in the other standalone stacks
So say you had a list Api Key Ids you created in your base infrastructure project and exported the outputs:
Copy code
export const apiAccessKeyIds = [...];
The the stack you create in the automation api can use a stack reference to get those outputs:
Copy code
const myBaseInfrastructureStack = new pulumi.StackReference("my-org/my-project/my-base-infrastructure-stack");
const apiAccessKeyIds = sharedInfrastructureStack.getOutput("apiAccessKeyIds");

apiAccessKeyIds.apply(apiAccessKeyIdsValue => {
  apiAccessKeyIdsValue.forEach(accessKey => {
    new aws.apigateway.UsagePlanKey(
      { keyId: apiAccessKeyIdsValue[accessKey] as string, keyType: "API_KEY", usagePlanId: apiAppUsagePlan.id },
      { additionalSecretOutputs: ["value"], parent: apiAppUsagePlan },
Hey catmeme, this works well if you're trying to wire the stack reference outputs into resource that created inside the inline program function... but it doesn't work if you're trying to configure providers that run before the program, e.g.
stack.setConfig('databricks:token', ...)
- in the end, Evan's solution to select a dummy stack is what did the magic trick: https://pulumi-community.slack.com/archives/C019YSXN04B/p1686690675302049?thread_ts=1686635500.103289&cid=C019YSXN04B