CloudFormation output is always ${Token[TOKEN.272]} when outputting to file

0

Stack A: Stack A outputs the websocket url e.g. wss://

_ = new CfnOutput(this, $"{id}-CfnWebSocketUrlOutput", new CfnOutputProps {
            Value = webSocketStage.Url,
            ExportName = "WebSocketUrl"
        });

Stack B: Stack B fetches that value.

var webSocketUrl = Fn.ImportValue("WebSocketUrl");

App: Stack B has a dependency on Stack A:

var app = new App();
var backendStack = new BackendStack(app, "BackendStack", new StackProps());
var frontendStack = new FrontendStack(app, "FrontendStack", new StackProps());
frontendStack.AddDependency(backendStack);
app.Synth();

Output in console: BackendStack.BackendStackCfnWebSocketUrlOutput = wss://dev

Value fetched in Stack B: In Stack B I am outputting the value into a JSON file but the value outputted it always ${Token[TOKEN.272]} and not the WebSocketUrl.

John
asked a month ago45 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions