From 2497730a5cfa7bf71fbc7d5c5173a64f04649de8 Mon Sep 17 00:00:00 2001
From: Nuwan Rajika Kumarasiri <nuwan.kumarasiri@wisc.edu>
Date: Thu, 30 Jan 2020 11:16:46 -0600
Subject: [PATCH] Add ECR resource for publishing Secure Agent image

Image will be built and publish by the CI/CD process
---
 terraform/ecr.tf       |  6 ++++++
 terraform/variables.tf | 12 ++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 terraform/ecr.tf

diff --git a/terraform/ecr.tf b/terraform/ecr.tf
new file mode 100644
index 0000000..dcf7ae4
--- /dev/null
+++ b/terraform/ecr.tf
@@ -0,0 +1,6 @@
+# this repository is being used by
+# .gitlab-ci.yml to publish the image
+resource "aws_ecr_repository" "foo" {
+  name                 = var.ecr_repository_name
+  tags = var.ecr_repository_tags
+}
\ No newline at end of file
diff --git a/terraform/variables.tf b/terraform/variables.tf
index 92cb9a4..82a3889 100644
--- a/terraform/variables.tf
+++ b/terraform/variables.tf
@@ -86,4 +86,16 @@ variable "ecs_task_name" {
 
 variable "ecs_service_name" {
   default = "iics-agent-service"
+}
+
+variable "ecr_repository_name" {
+  default = "265723766240.dkr.ecr.us-east-1.amazonaws.com/enterprise-integrations/iics_secure_agent"
+}
+
+variable "ecr_repository_tags" {
+  type    = map(string)
+  default = {
+    Name = "iics-agent-repository"
+    tier = "test"
+  }
 }
\ No newline at end of file
-- 
GitLab