I_code
I_code

Reputation: 59

How to refer an existing stack output variable value in my cdk stack?

I need to get the cloudformation stack, (which is already existing), Output variable value in my current cdk stack, how should I get that?

I tried using core.Fn.get_att?, but no much luck, can anyone help?

Upvotes: 2

Views: 2116

Answers (1)

Marcin
Marcin

Reputation: 238747

Assuming the the output has been exported by the other stack, in CDK there is Fn.importValue for importing the output:

The intrinsic function Fn::ImportValue returns the value of an output exported by another stack.

Upvotes: 2

Related Questions