(aws-cdk-lib.pipelines): not able to output variables from cloudformation action #18428
Open
2 tasks
Labels
@aws-cdk/pipelines
CDK Pipelines library
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p1
Description
Cloudformation action supports exposing outputs as variables: https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-variables.html#w2aac51c29b9b7
When adding stages with stacks, like this:
pipeline.addStage( new DeployToStage( this, ...
There is no way of specifying the variable namespace for each stack inside the stage, and therefore not possible to use cloudformation outputs as input to for example a LambdaInvokeStep. Reverting to the low-level aws-cdk-lib/aws-codepipeline is not an option, because there is a lot going on in the pipelines higher level construct which is painful to re-implement (according to this, the low-level supports specifying the variable namespace: #12252).
The only way to get a generated variable namespace is to add a bogus ShellStep with "envFromCfnOutputs", which will cause this code to generate a variable namespace (captureOutputs):
It would be nice if the "addStage" had some fn-param which enabled you to specify variableNameSpace for each stack added in the stage
Use Case
I want to use output variables from cloudformation actions in additional (not ShellSteps) steps added to the pipeline
Proposed Solution
Add the posibility to specify variableNamespace when adding a stage to the pipeline
Other information
No response
Acknowledge
The text was updated successfully, but these errors were encountered: