Skip to content

Commit

Permalink
added initial ecr tf scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronaldo Macapobre committed Jul 23, 2024
1 parent 7ad2759 commit d181de1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
13 changes: 13 additions & 0 deletions infrastructure/cloud/modules/container/ecr.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resource "aws_ecr_repository" "aws_ecr_repository" {
name = "${var.ecr_repository_name}-${var.environment}"
image_tag_mutability = "MUTABLE"

image_scanning_configuration {
scan_on_push = true
}

tags = {
env = var.environment
name = "${var.ecr_repository_name}-${var.environment}"
}
}
4 changes: 4 additions & 0 deletions infrastructure/cloud/modules/container/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output "ecr_url" {
description = "The ECR URL."
value = try(aws_ecr_repository.aws_ecr_repository.repository_url, "")
}
13 changes: 13 additions & 0 deletions infrastructure/cloud/modules/container/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


variable "environment" {
type = string
description = "The environment to deploy the application to"
default = "dev"
}

variable "ecr_repository_name" {
type = string
description = "Name of AWS ECR Repository"
default = "aws-ecr-repository"
}

0 comments on commit d181de1

Please sign in to comment.