oozou / terraform-aws-ecr

Terraform ECR component for AWS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS ECR Terraform Module

Terraform module with create ecr and ecr policy resources on AWS.

Usage

module "ecr" {
  source = "git::ssh://git@github.com:oozou/terraform-aws-ecr.git"
  repository_name = "zeus-test-repo"
  environment     = "dev"
  tags = {
    "test" : "example-tag"
  }
  push_pull_access_principal_arns = ["arn:aws:iam::xxx:user/ecr-test-user"]
}

Requirements

Name Version
terraform >= 1.0.0
aws >= 3.63

Providers

Name Version
aws 3.74.1

Modules

No modules.

Resources

Name Type
aws_ecr_repository.this resource
aws_ecr_repository_policy.allow_access resource
aws_iam_policy_document.allow_access data source

Inputs

Name Description Type Default Required
environment To manage a resources with tags string n/a yes
immutable The tag mutability setting for the repository bool false no
pull_access_principal_arns Principals to set to the repository policy to gain Pull access to the repo list(string) [] no
push_pull_access_principal_arns Principals to set to the repository policy to gain Push and Pull access to the repo list(string) [] no
repository_name Name of the repository string n/a yes
scan_on_push Indicates whether images are scanned after being pushed to the repository bool true no
tags Tag for a resource taht create by this component map(string) {} no

Outputs

Name Description
image_name Name of the ecr image
repository_arn ARN for the ecr repository
repository_url URL for the ecr repository

Requirements

Name Version
terraform >= 1.0.0
aws >= 4.0.0

Providers

Name Version
aws >= 4.0.0

Modules

Name Source Version
scan_eventbridge oozou/eventbridge/aws 1.1.0

Resources

Name Type
aws_ecr_lifecycle_policy.this resource
aws_ecr_repository.this resource
aws_ecr_repository_policy.allow_access resource
aws_iam_policy_document.allow_access data source

Inputs

Name Description Type Default Required
cloudwatch_event_target_arn The Amazon Resource Name (ARN) associated of the target. string "" no
encryption_configuration ECR encryption configuration
object({
encryption_type = string
kms_key = any
})
null no
environment To manage a resources with tags string n/a yes
immutable The tag mutability setting for the repository bool false no
is_create_lifecycle_policy Determines whether a lifecycle policy will be created bool false no
name Name of the repository (pass + micro service name) string n/a yes
prefix The prefix name of customer to be displayed in AWS console and resource string n/a yes
pull_access_principal_arns Principals to set to the repository policy to gain Pull access to the repo list(string) [] no
push_pull_access_principal_arns Principals to set to the repository policy to gain Push and Pull access to the repo list(string) [] no
repository_lifecycle_policy The policy document. This is a JSON formatted string. See more details about Policy Parameters in the official AWS docs string "" no
scan_on_push Indicates whether images are scanned after being pushed to the repository bool true no
severity_alert_options (Optional) Choose alerting options list(string)
[
"critical",
"high",
"medium"
]
no
tags Tag for a resource taht create by this component map(string) {} no

Outputs

Name Description
aws_cloudwatch_event_rule_arn The Amazon Resource Name (ARN) of the rule.
aws_cloudwatch_event_rule_id The name of the rule
image_name Name of the ecr image
repository_arn ARN for the ecr repository
repository_url URL for the ecr repository

About

Terraform ECR component for AWS

License:Apache License 2.0


Languages

Language:HCL 100.0%