Adds initial files]
This commit is contained in:
32
infra/ecr/main.tf
Normal file
32
infra/ecr/main.tf
Normal file
@@ -0,0 +1,32 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
aws = {
|
||||
source = "hashicorp/aws"
|
||||
version = "~> 6.27"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
provider "aws" {
|
||||
region = var.aws_region
|
||||
}
|
||||
|
||||
resource "aws_ecr_repository" "app" {
|
||||
name = var.repository_name
|
||||
image_tag_mutability = "MUTABLE" # or "IMMUTABLE"
|
||||
|
||||
image_scanning_configuration {
|
||||
scan_on_push = true
|
||||
}
|
||||
|
||||
encryption_configuration {
|
||||
encryption_type = "AES256" # or "KMS" for customer managed keys
|
||||
}
|
||||
|
||||
tags = {
|
||||
Name = var.repository_name
|
||||
Environment = var.environment
|
||||
ManagedBy = "Terraform"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user