Table of contents
ImportValue
The Fn::ImportValue
function in CloudFormation imports a value that has been previously exported from another stacks outputs section
Info on
Fn::ImportValue
from AWS can be found here
In KloudFormation you can use the ImportValue
class.
If another stack exports a VPC Id like this:
outputs( "StackVPC" to Output( value = vpc.ref(), description = "The ID of the VPC", export = Output.Export(awsStackName + "-VPCID") ) )
Then this can be imported as follows:
ImportValue(otherStackName.ref() + "-VPCID")