diff --git a/README.md b/README.md index ce34fb4..9d6f08f 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ The module deploys Karpenter needed AWS resources, namely in IAM. It copies the | [account\_id](#input\_account\_id) | aws account number | `string` | `""` | no | | [cluster\_endpoint](#input\_cluster\_endpoint) | Endpoint for your Kubernetes API server | `string` | n/a | yes | | [cluster\_name](#input\_cluster\_name) | EKS cluster name name component used through out the EKS cluster describing its purpose (ex: dice-dev) | `string` | n/a | yes | -| [eecr\_account\_id](#input\_eecr\_account\_id) | enterpirse ecr source aws account number | `string` | `""` | no | +| [eecr\_info](#input\_eecr\_info) | Enterprise ECR source information |
object({
account_id = string
alias = string
profile = string
region = string
}) | {
"account_id": "269222635945",
"alias": "lab-gov-shared-nonprod",
"profile": "269222635945-lab-gov-shared-nonprod",
"region": "us-gov-east-1"
} | no |
| [karpenter\_helm\_chart](#input\_karpenter\_helm\_chart) | Which helm chart of karpenter | `string` | `"1.1.1"` | no |
| [karpenter\_helm\_repo](#input\_karpenter\_helm\_repo) | Helm repo for official karpenter chart | `string` | `"oci://public.ecr.aws/karpenter"` | no |
| [karpenter\_node\_group\_name](#input\_karpenter\_node\_group\_name) | The cluster node group that will host karpenter, should not be a karpenter managed node group | `string` | n/a | yes |
diff --git a/copy_images.tf b/copy_images.tf
index 1e957af..2d7e7c1 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_account_id, "dkr.ecr", var.region, "amazonaws.com/ent-images")
+ ent_ecr_source = format("%v.%v.%v.%v", var.eecr_info.account_id, "dkr.ecr", var.region, "amazonaws.com/ent-images")
image_config = [
{
diff --git a/variables.tf b/variables.tf
index 4ea6a6a..1cd76ec 100644
--- a/variables.tf
+++ b/variables.tf
@@ -14,10 +14,20 @@ variable "cluster_name" {
type = string
}
-variable "eecr_account_id" {
- description = "enterpirse ecr source aws account number"
- type = string
- default = ""
+variable "eecr_info" {
+ description = "Enterprise ECR source information"
+ type = object({
+ account_id = string
+ alias = string
+ profile = string
+ region = string
+ })
+ default = {
+ account_id = "269222635945"
+ alias = "lab-gov-shared-nonprod"
+ profile = "269222635945-lab-gov-shared-nonprod"
+ region = "us-gov-east-1"
+ }
}
variable "karpenter_helm_chart" {