This tutorial will walk you through how to use the “Using stack and launch outputs” feature.
We will assume you have:
installed Service Catalog Puppet correctly
bootstrapped a spoke
created a manifest file
added an account to the manifest file
We will assume you are comfortable:
making changes your portfolios files
making changes your manifest file
provisioning stacks
provisioning products / launches
Step by step guide
Here are the steps you need to follow to “Using stack and launch outputs”
Things to note, before we start
The cloudformation_stack_output feature was added in version 0.150.0 of Service Catalog Puppet. You will need to be using this version (or later)
The servicecatalog_provisioned_product_output feature was added in version 0.160.0 of Service Catalog Puppet. You will need to be using this version (or later)
Provision a stack with some outputs
In order to use a stack output you must first provision a stack that provides the output. Here is an example of such a
template:
Here we are provisioning a stack that outputs VpcId as an output.
Provisioning a stack that depends on the initial stack, which consumes stack outputs
Once you have provisioned the stack that provides the output you will need to define a stack that uses the output:
Here we are defining a stack that uses VpcId as a parameter.
Provision a stack using Service Catalog Puppet
Now we are ready to provision the stack using the manifest file.
To use the output from one stack as a parameter for another you can use the following syntax:
In this example we are reading VpcCidrBlock and VpcId from the stack named example-vpc when provisioning the stack named
example-subnet.
Working with ServiceCatalog Provisioned product outputs
If you would like to obtain the output of a provisioned product deployment, it is possible to call
the servicecatalog_provisioned_product_output method to obtain stack outputs. In the example below we are calling from
the output of a launch called ‘example-vpc’