When using GitHub repository as source for aws_codebuild_project, I need to be able to specify the source version (e.g. branch name). This is currently supported through the UI:

I would like if the aws_codebuild_project source could support a source_version field or something similar.
Source version is a valid option for other git sources as well (CodeCommit, BitBucket, ...)
thank you for pointing out.
Has this been released yet? I don't see it in any of the release notes.
There are two API properties on this - both of which are independent of the source type (e.g. works with git/s3/etc.):
SourceVersion: https://github.com/aws/aws-sdk-go/blob/v1.25.11/service/codebuild/api.go#L1934SecondarySourceVersions: https://github.com/aws/aws-sdk-go/blob/v1.25.11/service/codebuild/api.go#L1917The latter might be a bit more complex to implement. I would be already very happy if the first type could be implemented ❤️
Anyone have any good workarounds for this?
Pull-request #9877 is open and still waiting for review. You can help the community and maintainers prioritize this request by adding a 👍 reaction to the original pull request comment.
Support for the top level source_version argument on the aws_codebuild_project resource has been merged and will release with version 2.48.0 of the Terraform AWS Provider, Thursday this week. Thanks to @RA999 for the implementation. 👍
This has been released in version 2.48.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 for triage. Thanks!
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
Most helpful comment
Source version is a valid option for other git sources as well (CodeCommit, BitBucket, ...)