Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support AWS CodeBuild using CodeStar Connection #40191

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AP-Hunt
Copy link
Contributor

@AP-Hunt AP-Hunt commented Nov 19, 2024

Description

In August 2024, Amazon announced that AWS CodeBuild now supported using the same GitHub app to access source code in CodeBuild as is used in CodePipeline [1].

This PR adds additional configuration options to the aws_codebuild_project resource which get translated into the relevant part of the CreateProject action in the CodeBuild API [2].

It also updates the documentation for the aws_codebuild_source_credential resource to include the CODECONNECTIONS type, which the provider already supported but wasn't documented.

I haven't included any additional tests in this change because it's targeting AWS CodeStar Connections, which require a human in the loop to set up. I hope a maintainer can say whether they're happy with this decision, or can suggest a useful test to include.

Relations

Closes #39011

References

[1] https://aws.amazon.com/about-aws/whats-new/2024/08/aws-codebuild-github-apps-access-source-repositories/

[2] https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ProjectSource.html#CodeBuild-Type-ProjectSource-auth

Output from Acceptance Testing

I haven't run the acceptance tests because I'm adding new, optional code branches which the acceptance tests don't cover. It shouldn't have any impact on them.

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/codebuild Issues and PRs that pertain to the codebuild service. needs-triage Waiting for first response or review from a maintainer. labels Nov 19, 2024
AP-Hunt added a commit to AP-Hunt/terraform-provider-aws that referenced this pull request Nov 19, 2024
AP-Hunt added a commit to AP-Hunt/terraform-provider-aws that referenced this pull request Nov 19, 2024
@AP-Hunt AP-Hunt force-pushed the f_support-codebuild-using-codestar-connection branch from e5900a7 to 05c88f2 Compare November 19, 2024 17:01
AP-Hunt added a commit to AP-Hunt/terraform-provider-aws that referenced this pull request Nov 19, 2024
@AP-Hunt AP-Hunt force-pushed the f_support-codebuild-using-codestar-connection branch from 05c88f2 to aa149b6 Compare November 19, 2024 17:08
AP-Hunt added a commit to AP-Hunt/terraform-provider-aws that referenced this pull request Nov 19, 2024
@AP-Hunt AP-Hunt force-pushed the f_support-codebuild-using-codestar-connection branch from aa149b6 to 239ad38 Compare November 19, 2024 17:32
In August 2024, Amazon announced that AWS CodeBuild now supported using the
same GitHub app to access source code in CodeBuild as is used in
CodePipeline.[1]

This commit adds an optional "auth" block to "source" and "secondary_source"
blocks in the aws_codebuild_project resource.

That configuration, if present, is translated into the "auth" property of
the CreateProject API call.[2]

[1] https://aws.amazon.com/about-aws/whats-new/2024/08/aws-codebuild-github-apps-access-source-repositories/

[2] https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ProjectSource.html#CodeBuild-Type-ProjectSource-auth
…credential

The code already supported this, but it wasn't documented.
@AP-Hunt AP-Hunt force-pushed the f_support-codebuild-using-codestar-connection branch from 239ad38 to fb1a0d5 Compare November 20, 2024 09:50
@AP-Hunt AP-Hunt marked this pull request as ready for review November 20, 2024 10:26
@AP-Hunt AP-Hunt requested a review from a team as a code owner November 20, 2024 10:26
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/codebuild Issues and PRs that pertain to the codebuild service.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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