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개 답변
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
전문가
답변함 일 년 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠