Skip to content

Commit

Permalink
🐛 Removes splitting of arn
Browse files Browse the repository at this point in the history
  • Loading branch information
daschaa committed Nov 30, 2023
1 parent d24fafe commit 76613f8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ export class CodePipelineStartPipelineExecution extends ScheduleTargetBase imple
}

protected addTargetActionToRole(schedule: ISchedule, role: IRole): void {
const pipelineArn = Arn.split(this.pipeline.pipelineArn, ArnFormat.NO_RESOURCE_NAME);
const region = pipelineArn.region ?? '';
const account = pipelineArn.account ?? '';
const region = this.pipeline.env.region ?? '';
const account = this.pipeline.env.account ?? '';

if (!sameEnvDimension(region, schedule.env.region)) {
throw new Error(`Cannot assign pipeline in region ${region} to the schedule ${Names.nodeUniqueId(schedule.node)} in region ${schedule.env.region}. Both the schedule and the pipeline must be in the same region.`);
Expand Down

0 comments on commit 76613f8

Please sign in to comment.