From 837dfca19f370b9ae388ae36558ce812670882fe Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Fri, 18 Apr 2025 21:16:40 -0400 Subject: [PATCH] update copy images for eecr pulling --- README.md | 2 ++ copy_images.tf | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index d0f9778..6630bca 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ Common issues and solutions: | Name | Version | |------|---------| | [aws](#provider\_aws) | ~> 5.14 | +| [aws.eecr](#provider\_aws.eecr) | ~> 5.14 | | [helm](#provider\_helm) | ~> 2.11 | | [kubernetes](#provider\_kubernetes) | ~> 2.23 | | [null](#provider\_null) | ~> 3.2 | @@ -103,6 +104,7 @@ Common issues and solutions: | [null_resource.git_version](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | | [null_resource.module_name](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | | [random_uuid.user_secret](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/uuid) | resource | +| [aws_ecr_authorization_token.ecr_token](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecr_authorization_token) | data source | | [aws_ecr_authorization_token.token](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecr_authorization_token) | data source | | [kubernetes_secret.db-secrets](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/secret) | data source | diff --git a/copy_images.tf b/copy_images.tf index 987e60e..84773ea 100644 --- a/copy_images.tf +++ b/copy_images.tf @@ -59,3 +59,14 @@ module "images" { data "aws_ecr_authorization_token" "token" { registry_id = var.account_id } + +data "aws_ecr_authorization_token" "ecr_token" { + provider = aws.eecr + registry_id = var.eecr_info.account_id +} + +provider "aws" { + alias = "eecr" + profile = var.eecr_info.profile + region = var.eecr_info.region +}