diff --git a/README.md b/README.md
index e38ebc1..fe19e29 100644
--- a/README.md
+++ b/README.md
@@ -26,8 +26,7 @@ The module deploys Karpenter needed AWS resources, namely in IAM. It copies the
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | 5.100.0 |
-| [aws.eecr](#provider\_aws.eecr) | 5.100.0 |
+| [aws](#provider\_aws) | 6.15.0 |
| [helm](#provider\_helm) | 3.0.2 |
| [null](#provider\_null) | 3.2.4 |
@@ -36,7 +35,7 @@ The module deploys Karpenter needed AWS resources, namely in IAM. It copies the
| Name | Source | Version |
|------|--------|---------|
| [images](#module\_images) | git::https://github.e.it.census.gov/terraform-modules/aws-ecr-copy-images.git | tf-upgrade |
-| [karpenter\_resources](#module\_karpenter\_resources) | git::https://github.e.it.census.gov/SCT-Engineering/terraform-aws-eks.git//modules/karpenter | v20.37.2 |
+| [karpenter\_resources](#module\_karpenter\_resources) | git::https://github.e.it.census.gov/SCT-Engineering/terraform-aws-eks.git//modules/karpenter | v21.4.0 |
## Resources
@@ -47,8 +46,6 @@ 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
diff --git a/copy_images.tf b/copy_images.tf
index daa4606..957b5ac 100644
--- a/copy_images.tf
+++ b/copy_images.tf
@@ -1,6 +1,6 @@
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 = [
{
@@ -8,9 +8,10 @@ locals {
dest_path = null
name = "karpenter/controller"
source_image = "karpenter/controller"
- source_registry = format("%v/%v", local.ent_ecr_source, "public-ecr")
- source_tag = var.karpenter_tag
- tag = var.karpenter_tag
+ 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
},
]
}
@@ -28,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"
diff --git a/main.tf b/main.tf
index ffbc633..a45e508 100644
--- a/main.tf
+++ b/main.tf
@@ -21,18 +21,14 @@ locals {
# Replicating from here: https://github.e.it.census.gov/SCT-Engineering/terraform-aws-eks/tree/master/modules/karpenter
# Karpenter IRSA roles and policies
module "karpenter_resources" {
- source = "git::https://github.e.it.census.gov/SCT-Engineering/terraform-aws-eks.git//modules/karpenter?ref=v20.37.2"
+ source = "git::https://github.e.it.census.gov/SCT-Engineering/terraform-aws-eks.git//modules/karpenter?ref=v21.4.0"
cluster_name = var.cluster_name
create_access_entry = true
create_instance_profile = true
create_node_iam_role = true
create_pod_identity_association = true
- enable_irsa = true
- irsa_namespace_service_accounts = ["${var.namespace}:karpenter"]
- irsa_oidc_provider_arn = var.oidc_provider_arn
- enable_pod_identity = true
- enable_v1_permissions = true
+ namespace = var.namespace
node_iam_role_name = local.node_iam_role_name
queue_name = local.queue_name
rule_name_prefix = local.rule_name_prefix
diff --git a/variables.tf b/variables.tf
index 1cd76ec..8a23f33 100644
--- a/variables.tf
+++ b/variables.tf
@@ -1,3 +1,4 @@
+# tflint-ignore: terraform_unused_declarations
variable "account_id" {
description = "aws account number"
type = string
@@ -14,6 +15,7 @@ variable "cluster_name" {
type = string
}
+# tflint-ignore: terraform_unused_declarations
variable "eecr_info" {
description = "Enterprise ECR source information"
type = object({