From 489f256b7a894ce691cd0ab808e02598130f0f2f Mon Sep 17 00:00:00 2001 From: Srini Nangunuri Date: Wed, 9 Apr 2025 18:08:06 -0400 Subject: [PATCH] Pointing ecr images to eecr --- copy_images.tf | 15 +++++++++++---- variables.tf | 14 ++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/copy_images.tf b/copy_images.tf index b26ad1f..4e988e5 100644 --- a/copy_images.tf +++ b/copy_images.tf @@ -8,8 +8,8 @@ locals { enabled = true dest_path = null name = "istio-tools/kiali-operator" - source_image = "kiali/kiali-operator" - source_registry = "quay.io" + source_image = "ironbank/opensource/kiali/kiali-operator" + source_registry = var.source_registry source_tag = var.kiali_application_version tag = var.kiali_application_version }, @@ -17,8 +17,8 @@ locals { enabled = true dest_path = null name = "istio-tools/kiali" - source_image = "kiali/kiali" - source_registry = "quay.io" + source_image = "ironbank/opensource/kiali/kiali" + source_registry = var.source_registry source_tag = var.kiali_application_version tag = var.kiali_application_version }, @@ -33,7 +33,14 @@ module "images" { image_config = local.image_config tags = {} + source_username = data.aws_ecr_authorization_token.token.user_name + source_password = data.aws_ecr_authorization_token.token.password + enable_lifecycle_policy = true lifecycle_policy_all = true force_delete = true } + +data "aws_ecr_authorization_token" "token" { + registry_id = var.registry_id +} diff --git a/variables.tf b/variables.tf index 2af2040..96032f8 100644 --- a/variables.tf +++ b/variables.tf @@ -65,6 +65,20 @@ variable "kiali_operator_version" { default = "1.73.0" } +#source registry (enterpriser ecr account) where source image is being copied into target account +variable "source_registry" { + description = "source of the image or enterprise ECR account" + type = string + default = "269222635945.dkr.ecr.us-gov-east-1.amazonaws.com/ent-images" +} + +#source registry (enterpriser ecr account) +variable "registry_id" { + description = "source of the image or enterprise ECR account" + type = string + default = "269222635945" +} + # See the [APP VERSION] found while determining kiali_operator_version # helm show values kiali/kiali-operator | grep tag: variable "kiali_application_version" {