Skip to content

Latest commit

 

History

History

ecr-project

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

ECR Project

This modules creates a CodeBuild project to build Docker images from your application code.

To use this module:

  • Create an ECR repository for your Docker images.
  • Add a Dockerfile and buildspec to your application source repository.
  • The buildspec should include instructions for building and pushing your Docker images to your ECR repository.
  • The CodeBuild project will use a role with permission to pull from and push to your ECR repository.
  • Add your ECR project to your CI/CD pipeline to build images when pull requests are merged.

Requirements

Name Version
terraform >= 0.14.0
aws ~> 4.0

Providers

Name Version
aws 4.23.0

Modules

Name Source Version
project ../codebuild-project n/a

Resources

Name Type
aws_iam_policy.ecr resource
aws_ecr_repository.secondary data source
aws_ecr_repository.this data source
aws_iam_policy_document.ecr data source

Inputs

Name Description Type Default Required
artifacts_bucket Name of the S3 bucket in which artifacts are stored string n/a yes
buildspec Override the buildspec for this project string null no
codestar_connection SSM parameter containing the ARN of the CodeStar connection string n/a yes
ecr_repository ECR repository to which images should be pushed string n/a yes
enable_github_webhook Set to false if the GitHub token can't manage webhooks bool true no
github_repository Full name of the GitHub repository at which source is found string n/a yes
name Name for this CodeBuild project string n/a yes
namespace Prefix to apply to created resources list(string) [] no
policies Additional policies for this CodeBuild project's role map(object({ arn = string })) {} no
secondary_ecr_repositories Additional ECR repositories this project needs to use list(string) [] no
tags Tags to be applied to created resources map(string) {} no

Outputs

Name Description
instance The created project
name Name of the created project