I want to use the value of pipelines.CodePipelineSource.sourceAttribute() in another Stage other than synth.

0

I am using aws-cdk-lib/pipelines to build CDKPipeline (CodePipeline)

I have defined the integration with GitHub below.

pipelines.CodePipelineSource.connection()

I would like to pass sourceAttribute('CommitId') not in synth, but in subsequent Stage props, etc., to access it.

However, an error occurs.

Error: Resolution error: Resolution error: Resolution error: Output for step CodeStarConnectionSource(XXX) not configured. Either the step is not in the pipeline, the step implementation did not call 'this.discoverReferencedOutputs()', or this engine does not support Outputs for this step....

I am having trouble with discoverReferencedOutputs because it does not exist in CDK V2. I would like to know the solution.

cf. https://github.com/aws/aws-cdk/issues/20643

1 Antwort
0

Hi,

Have a look at this https://repost.aws/knowledge-center/cdk-cross-stack-reference.

Typically I would use SSM parameter store to pass data, but could be not feasible in certain cases.

Hope it helps;)

profile picture
EXPERTE
beantwortet vor einem Jahr
  • Thanks for the response!!

    I like the idea of using Parameter Store and I do use it. The pipeline is deployed to two accounts, one in the staging environment and one in the production environment. The pipeline itself resides in the staging account.

    Therefore, it is easy to put the pipeline into the staging account's Parameter Store, but it is a bit cumbersome to put it into the production account's Parameter Store because it requires an Assume Role.

    So I was hoping to pass the sourceAttribute to the production stage as props, but it seems to be difficult.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen