Skip to content

Terraform module for creating Amazon Elastic Container Registry.

License

Notifications You must be signed in to change notification settings

opsd-io/terraform-module-aws-ecr-repository

Repository files navigation

OPSd - the unique and effortless way of managing cloud infrastructure.

Meet OPSd. The unique and effortless way of managing cloud infrastructure.

terraform-module-aws-ecr-repository

Introduction

This module provides an Elastic Container Registry Repository.

Usage

module "example" {
  source = "github.com/opsd-io/terraform-module-aws-ecr-repository"
  name   = "foobar-service"

  image_tag_mutable = true
  scan_on_push      = true
}

IMPORTANT: Make sure not to pin to master because there may be breaking changes between releases.

Requirements

Name Version
terraform >= 1.5.5
aws ~> 5.0

Providers

Name Version
aws ~> 5.0

Modules

No modules.

Resources

Name Type
aws_ecr_lifecycle_policy.main resource
aws_ecr_repository.main resource
aws_ecr_repository_policy.main resource
aws_iam_policy_document.repository_policy data source

Inputs

Name Description Type Default Required
common_tags A map of tags to assign to every resource in this module. map(string) {} no
encryption_kms_key The ARN of the KMS key to use for the repository encryption. string null no
image_tag_mutable The tag mutability setting for the repository. bool true no
lifecycle_rules List of lifecycle policy rules.
list(object({
priority = number
description = optional(string)
tag_status = string # "tagged"
"untagged" "any"
tag_patterns = optional(list(string))
tag_prefixes = optional(list(string))
count_type = string # "imageCountMoreThan"
name Name of the repository. string n/a yes
policy_documents List of IAM policy documents that are merged together for the repository policy. list(string) [] no
scan_on_push Indicates whether images are scanned after being pushed to the repository. bool true no

Outputs

Name Description
arn Full ARN of the repository.
registry_id The registry ID where the repository was created.
repository_url The URL of the repository.

Examples of usage

Do you want to see how the module works? See all the usage examples.

Related modules

The list of related modules (if present).

Contributing

If you are interested in contributing to the project, see see our guide.

Support

If you have a problem with the module or want to propose a new feature, you can report it via the project's (Github) issue tracker.

If you want to discuss something in person, you can join our community on Slack.

License

Apache License 2.0

About

Terraform module for creating Amazon Elastic Container Registry.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages