AWS CodeBuild now supports cross account ECR images being used as the build environment image for CodeBuild jobs. This is helpful because now a group can manage and maintain codebuild build images in a centralized account and distribute them to users in an organization. The feature request is to support this feature of AWS CodeBuild. Currently there isn't an option to use the cross account ECR feature
https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html
environment {
compute_type = "BUILD_GENERAL1_SMALL"
image {
url = "${var.codebuild_environment_image}"
cross_account_ecr = true
}
type = "LINUX_CONTAINER"
}
https://aws.amazon.com/about-aws/whats-new/2019/01/aws-codebuild-now-supports-accessing-cross-account-ecr-images/
https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html
It looks like this field that's already in the ProjectEnvironment may do the trick ImagePullCredentialsType
, but it doesn't seem to have made it into the aws_codebuild_project resource schema.
Support for a new image_pull_credentials_type
argument inside the project_environment
configuration block has been merged and will release with version 2.3.0 of the Terraform AWS Provider, likely middle of next week. 👍
This has been released in version 2.3.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
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
Support for a new
image_pull_credentials_type
argument inside theproject_environment
configuration block has been merged and will release with version 2.3.0 of the Terraform AWS Provider, likely middle of next week. 👍