Skip to content

Commit

Permalink
pointing ecr images to eecr account
Browse files Browse the repository at this point in the history
  • Loading branch information
nangu001 committed Apr 9, 2025
1 parent 845344d commit 2403681
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
15 changes: 11 additions & 4 deletions copy_images.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ locals {
enabled = true
dest_path = null
name = "istio/pilot"
source_image = "istio/pilot"
source_registry = "docker.io"
source_image = "ironbank/opensource/istio/pilot"
source_registry = var.source_registry
source_tag = var.istio_version
tag = var.istio_version
},
{
enabled = true
dest_path = null
name = "istio/proxyv2"
source_image = "istio/proxyv2"
source_registry = "docker.io"
source_image = "ironbank/opensource/istio/proxyv2"
source_registry = var.source_registry
source_tag = var.istio_version
tag = var.istio_version
},
Expand All @@ -32,7 +32,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
}
14 changes: 14 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ variable "tags" {
default = {}
}

#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"
}

# helm repo add istio https://istio-release.storage.googleapis.com/charts
# helm search repo istio/istiod
variable "istio_chart_version" {
Expand Down

0 comments on commit 2403681

Please sign in to comment.