Skip to content

Commit

Permalink
undo eecr workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jan 16, 2026
1 parent 88611c4 commit b661973
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 26 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The module deploys Karpenter needed AWS resources, namely in IAM. It copies the
| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 6.15.0 |
| <a name="provider_aws.eecr"></a> [aws.eecr](#provider\_aws.eecr) | 6.15.0 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | 3.0.2 |
| <a name="provider_null"></a> [null](#provider\_null) | 3.2.4 |

Expand All @@ -46,6 +47,8 @@ The module deploys Karpenter needed AWS resources, namely in IAM. It copies the
| [null_resource.git_version](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
| [aws_arn.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) | data source |
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
| [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 |
| [aws_ecr_image.karpenter_image](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecr_image) | data source |

## Inputs
Expand Down
52 changes: 26 additions & 26 deletions copy_images.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
locals {
karpenter_key = format("%v#%v", "karpenter/controller", var.karpenter_tag)
# ent_ecr_source = format("%v.%v.%v.%v", var.eecr_info.account_id, "dkr.ecr", var.region, "amazonaws.com/ent-images")
karpenter_key = format("%v#%v", "karpenter/controller", var.karpenter_tag)
ent_ecr_source = format("%v.%v.%v.%v", var.eecr_info.account_id, "dkr.ecr", var.region, "amazonaws.com/ent-images")

image_config = [
{
enabled = true
dest_path = null
name = "karpenter/controller"
source_image = "karpenter/controller"
source_registry = "public.ecr.aws"
# source_registry = format("%v/%v", local.ent_ecr_source, "public-ecr")
source_tag = var.karpenter_tag
tag = var.karpenter_tag
enabled = true
dest_path = null
name = "karpenter/controller"
source_image = "karpenter/controller"
# source_registry = "public.ecr.aws"
source_registry = format("%v/%v", local.ent_ecr_source, "public-ecr")
source_tag = var.karpenter_tag
tag = var.karpenter_tag
},
]
}
Expand All @@ -29,27 +29,27 @@ module "images" {
force_delete = true
lifecycle_policy_keep_count = 5

# source_username = data.aws_ecr_authorization_token.ecr_token.user_name
# source_password = data.aws_ecr_authorization_token.ecr_token.password
source_username = data.aws_ecr_authorization_token.ecr_token.user_name
source_password = data.aws_ecr_authorization_token.ecr_token.password

# destination_username = data.aws_ecr_authorization_token.token.user_name
# destination_password = data.aws_ecr_authorization_token.token.password
destination_username = data.aws_ecr_authorization_token.token.user_name
destination_password = data.aws_ecr_authorization_token.token.password
}

# data "aws_ecr_authorization_token" "token" {
# registry_id = var.account_id
# }
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
# }
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
# }
provider "aws" {
alias = "eecr"
profile = var.eecr_info.profile
region = var.eecr_info.region
}

output "image_config" {
description = "Map of image references to their full source paths"
Expand Down

0 comments on commit b661973

Please sign in to comment.