Resource: aws_ecr_repository

Provides an Elastic Container Registry Repository.

Example Usage

resource "aws_ecr_repository" "foo" {
  name                 = "bar"
  image_tag_mutability = "MUTABLE"

  image_scanning_configuration {
    scan_on_push = true
  }
}

Argument Reference

This resource supports the following arguments:

encryption_configuration

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import ECR Repositories using the name. For example:

import {
  to = aws_ecr_repository.service
  id = "test-service"
}

Using terraform import, import ECR Repositories using the name. For example:

% terraform import aws_ecr_repository.service test-service