Terraform-provider-aws: Support Cross-Account ECR Images for CodeBuild Environments

Created on 5 Feb 2019  ·  4Comments  ·  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

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://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

New or Affected Resource(s)

  • aws_codebuild_project

Potential Terraform Configuration

environment {
    compute_type    = "BUILD_GENERAL1_SMALL"
    image           {
        url = "${var.codebuild_environment_image}"
        cross_account_ecr = true
    }
    type            = "LINUX_CONTAINER"
}

References

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

  • #0000
enhancement serviccodebuild

Most helpful comment

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. 👍

All 4 comments

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!

Was this page helpful?
0 / 5 - 0 ratings