terraform-provider-aws icon indicating copy to clipboard operation
terraform-provider-aws copied to clipboard

[Enhancement]: AWS CodeBuild now supports using GitHub Apps to access source repositories

Open trevorrea opened this issue 1 year ago • 1 comments

Description

AWS CodeBuild now integrates with GitHub Apps as the authentication method to access your repositories. A GitHub App connection can be set as the default authentication method for all projects, or can be specified for an individual project source.

Affected Resource(s) and/or Data Source(s)

aws_codebuild aws_codebuild_source_credential

Potential Terraform Configuration

resource "aws_codebuild_project" "example" {
  source {
    type            = "GITHUB"
    location        = "https://github.com/example/example.git"
    auth {
       type = "CODECONNECTIONS",
       resource = "arn:aws:codestar-connections:us-east-1:xxxxxxxxxxxx:connection/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
  }
}

resource "aws_codebuild_source_credential" "example" {
  auth_type   = "CODECONNECTIONS"
  resource = "arn:aws:codestar-connections:us-east-1:xxxxxxxxxxxx:connection/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

References

Announcement : https://aws.amazon.com/about-aws/whats-new/2024/08/aws-codebuild-github-apps-access-source-repositories/ Documentation: https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens-github-overview.html#connections-github-app

Would you like to implement a fix?

None

trevorrea avatar Aug 23 '24 13:08 trevorrea

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

github-actions[bot] avatar Aug 23 '24 13:08 github-actions[bot]

Any update on this issue?

lvthillo avatar Dec 20 '24 14:12 lvthillo

It would be really good to get this in. Any updates?

kieran-lowe avatar Jan 06 '25 10:01 kieran-lowe

Any updates on this issue? I am facing a similar problem where I can not specify a codeconnection but for bitbucket

notAmine avatar Feb 10 '25 14:02 notAmine

FYI, someone has a PR open for a fix for this: https://github.com/hashicorp/terraform-provider-aws/pull/40191

infosec-shinobi avatar Feb 21 '25 13:02 infosec-shinobi

[!WARNING] This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

github-actions[bot] avatar Mar 10 '25 18:03 github-actions[bot]

This functionality has been released in v5.91.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] avatar Mar 13 '25 17:03 github-actions[bot]

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Apr 13 '25 02:04 github-actions[bot]