I've just started exploring the AWS-CDK to generate resources and create pipeline (CI/CD). I was trying to hook the existing pipeline to an external github, but ran into an issue where I need to use the connection method. Here I need to provide an arn for codestar-connections, I want to create this resource in the same xxxStack.java file. I'll then use this arn to be dynamically added to the connection method, how can I achieve this ?
Sample code:
.input(CodePipelineSource.connection("my-org/my-app", "main", ConnectionSourceOptions.builder().connectionArn("<get-dynamically-generated-arn>").build()))