This tutorial <https://serverless-stack.com/chapte...
# help
g
This tutorial https://serverless-stack.com/chapters/cross-stack-references-in-serverless.html#cloudformation-export-in-serverless-framework doesn’t explain how to import values in sst from another stack (only through Serveless framework). Is there any sst constructor to import values exported through:
Copy code
export default class MyStack extends Stack {
  constructor(scope, id, props) {
    super(scope, id, props);

    const topic = new Topic(this, "Topic");

    this.addOutputs({
      TopicArn: { value: topic.snsTopic.topicArn, exportName: "MyTopicArn" },
    });
  }
}
m
You can use the
cdk.Fn.importValue
from the cdk like it's done here and pass in the exportName you specified