diff --git a/README.md b/README.md index 9738de3..738e52e 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ Common issues and solutions: | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| +| [account\_id](#input\_account\_id) | aws account number | `string` | `""` | no | | [cluster\_domain](#input\_cluster\_domain) | The domain name used to reference ingresses for the cluster. | `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 | | [default\_storage\_class](#input\_default\_storage\_class) | The default storage class to use for persistent volumes | `string` | `"gp3-encrypted"` | no | @@ -105,6 +106,7 @@ Common issues and solutions: | [namespace](#input\_namespace) | The namespace which will be created and into which keycloak will be deployed. | `string` | `"keycloak"` | no | | [postgresql\_tag](#input\_postgresql\_tag) | The tag of the postgresql image to use. | `string` | `"17.4.0"` | no | | [profile](#input\_profile) | AWS config profile used to upload images into ECR | `string` | `""` | no | +| [region](#input\_region) | region name | `string` | `"us-gov-east-1"` | no | | [service\_name](#input\_service\_name) | The name of the service to be deployed in the EKS cluster. | `string` | `"service"` | no | | [telemetry\_namespace](#input\_telemetry\_namespace) | The namespace used for telemetry. | `string` | `"namespace"` | no | diff --git a/copy_images.tf b/copy_images.tf index 858d2c6..ecc3638 100644 --- a/copy_images.tf +++ b/copy_images.tf @@ -3,6 +3,7 @@ locals { keycloak_key = format("%v#%v", local.keycloak_name, var.keycloak_tag) postgresql_key = format("%v#%v", "bitnami/postgresql", var.postgresql_tag) kubectl_key = format("%v#%v", "bitnami/kubectl-debian", var.kubectl_image_tag) + # ent_ecr_source = format("%v.%v.%v.%v", var.account_id, "dkr.ecr", var.region, "amazonaws.com/ent-images") image_config = [ { @@ -46,5 +47,19 @@ module "images" { enable_lifecycle_policy = true lifecycle_policy_all = true force_delete = true - lifecycle_policy_keep_count = 3 + 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 + + # destination_username = data.aws_ecr_authorization_token.token.user_name + # destination_password = data.aws_ecr_authorization_token.token.password } + +# data "aws_ecr_authorization_token" "ecr_token" { +# registry_id = var.account_id +# } + +# data "aws_ecr_authorization_token" "token" { +# registry_id = var.account_id +# } diff --git a/variables.tf b/variables.tf index 60a8208..616c45f 100644 --- a/variables.tf +++ b/variables.tf @@ -1,12 +1,24 @@ +# tflint-ignore: terraform_unused_declarations +variable "account_id" { + description = "aws account number" + type = string + default = "" +} + +variable "cluster_domain" { + description = "The domain name used to reference ingresses for the cluster." + type = string +} + variable "cluster_name" { description = "EKS cluster name name component used through out the EKS cluster describing its purpose (ex: dice-dev)" type = string } -variable "profile" { - description = "AWS config profile used to upload images into ECR" +variable "default_storage_class" { + description = "The default storage class to use for persistent volumes" type = string - default = "" + default = "gp3-encrypted" } variable "keycloak_namespace" { @@ -27,13 +39,14 @@ variable "keycloak_tag" { default = "26.0.7" } -variable "cluster_domain" { - description = "The domain name used to reference ingresses for the cluster." +variable "keycloak_user" { + description = "The username for the database." type = string + default = "keycloak" } -variable "keycloak_database" { - description = "The name of the database to create in the RDS instance." +variable "namespace" { + description = "The namespace which will be created and into which keycloak will be deployed." type = string default = "keycloak" } @@ -47,13 +60,13 @@ variable "keycloak_postgres_db_hostname" { variable "keycloak_user" { description = "The username for the database." type = string - default = "keycloak" + default = "17.4.0" } -variable "keycloak_password" { - description = "The initial password for the database." +variable "profile" { + description = "AWS config profile used to upload images into ECR" type = string - default = "keycloak" + default = "" } variable "keycloak_hostname" { @@ -65,7 +78,7 @@ variable "keycloak_hostname" { variable "default_storage_class" { description = "The default storage class to use for persistent volumes" type = string - default = "gp3-encrypted" + default = "us-gov-east-1" } variable "service_name" { @@ -113,4 +126,4 @@ variable "admin_email" { description = "The email address of the admin of the default realm." type = string default = "luther.coleman.mcginty@census.gov" -} \ No newline at end of file +}