This example demonstrates how to use stack output resolver to read outputs from one stack and use them as input parameters in another stack.
When the example is deployed, the custom resolvers are used to resolve values for the stack parameters.
See the complete example at GitHub.
The example consists of the following files:
There are two stacks: vpc.yml and security-groups.yml. The former creates a VPC and the latter takes the VPC's id as a parameter and uses it to create a security group.
The template of vpc.yml stack contains the VPC resource whose id is exposed through stack outputs:
The configuration file of security-groups.yml stack uses the stack-output resolver to read the value for the VpcId parameter:
To deploy the example stacks, run command:
To remove the created stacks, run command:
Find more information from the documentation: