How do i connect AWS codepipeline to github repository using terraform

0

I tried to use the aws_codestarconnections_connection to connect it using the arn in the aws_codepipeline but i have no idea how to authenticate them this is the error i get from terraform 'creating CodePipeline (CI-comaprism-pipeline): InvalidActionDeclarationException: Action configuration for action 'Source' contains unknown configuration 'connectionArn'

Is there any steps or documentations useful? Because i can't see concise usage steps in hashicorp documentation

1 Answer
0
Accepted Answer

Hi,

I haven’t done this in terraform, but I recall that in CDK, you were forced to manually generated the connection ARN through the UI first. Once you have connected GitHub with CodePipeline/CodeStar in the AWS console (not in the IaC), then the connection ARN is available and you can reference it in your IaC code.

I mentioned the above as a similar setup may be needed in console (one time action) and then you would get the connection ARN.

Not fully automated but I am not aware of similar path in terraform.

profile picture
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions