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 Antwort
0
Akzeptierte Antwort

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
EXPERTE
beantwortet vor einem Jahr

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