Skip to content

Commit

Permalink
Add ecr module to main
Browse files Browse the repository at this point in the history
  • Loading branch information
shri committed Aug 8, 2024
1 parent 2d8c1da commit 797eb05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions deploy/aws/tf/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ module "alb" {
security_groups = [module.vpc.alb_security_group_id]
}

module "ecr" {
source = "./modules/ecr"
app_name = var.app_name
environment = var.environment
}

module "ecs" {
source = "./modules/ecs"
app_name = var.app_name
Expand Down
8 changes: 6 additions & 2 deletions deploy/aws/tf/modules/ecr/main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# tf/modules/ecr/main.tf

resource "aws_ecr_repository" "app_repository" {
name = "${var.app_name}-app-repository-${var.environment}"
name = "${var.app_name}-repository-${var.environment}"

image_scanning_configuration {
scan_on_push = true
}

tags = {
Name = "${var.app_name}-app-repository-${var.environment}"
Name = "${var.app_name}-repository-${var.environment}"
Environment = var.environment
}
}

0 comments on commit 797eb05

Please sign in to comment.