Skip to content

Commit

Permalink
use ssh until tfmod-config-job is public
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Apr 18, 2025
1 parent 10f6aeb commit 089a936
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 48 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ Common issues and solutions:
|------|--------|---------|
| <a name="module_images"></a> [images](#module\_images) | git@github.e.it.census.gov:terraform-modules/aws-ecr-copy-images.git/ | tf-upgrade |
| <a name="module_ingress_resources"></a> [ingress\_resources](#module\_ingress\_resources) | git::https://github.e.it.census.gov/SCT-Engineering/tfmod-istio-service-ingress.git | n/a |
| <a name="module_keycloak_db_config"></a> [keycloak\_db\_config](#module\_keycloak\_db\_config) | git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//config-job | n/a |
| <a name="module_post_install"></a> [post\_install](#module\_post\_install) | git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//config-job | n/a |
| <a name="module_pre_install"></a> [pre\_install](#module\_pre\_install) | git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//config-job | n/a |
| <a name="module_service_account"></a> [service\_account](#module\_service\_account) | git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//service-account | n/a |
| <a name="module_keycloak_db_config"></a> [keycloak\_db\_config](#module\_keycloak\_db\_config) | git@github.e.it.census.gov:SCT-Engineering/tfmod-config-job.git//config-job | n/a |
| <a name="module_post_install"></a> [post\_install](#module\_post\_install) | git@github.e.it.census.gov:SCT-Engineering/tfmod-config-job.git//config-job | n/a |
| <a name="module_pre_install"></a> [pre\_install](#module\_pre\_install) | git@github.e.it.census.gov:SCT-Engineering/tfmod-config-job.git//config-job | n/a |
| <a name="module_service_account"></a> [service\_account](#module\_service\_account) | git@github.e.it.census.gov:SCT-Engineering/tfmod-config-job.git//service-account | n/a |

## Resources

Expand Down Expand Up @@ -120,11 +120,12 @@ Common issues and solutions:
| <a name="input_keycloak_namespace"></a> [keycloak\_namespace](#input\_keycloak\_namespace) | The namespace which will be created and into which keycloak will be deployed. | `string` | `"keycloak"` | no |
| <a name="input_keycloak_tag"></a> [keycloak\_tag](#input\_keycloak\_tag) | The image tag associated with the keycloak\_chart\_version | `string` | `"26.0.7"` | no |
| <a name="input_keycloak_user"></a> [keycloak\_user](#input\_keycloak\_user) | The username for the database. | `string` | `"keycloak"` | no |
| <a name="input_kubectl_image_tag"></a> [kubectl\_image\_tag](#input\_kubectl\_image\_tag) | Version tag for the docker image to use to execute kubectl commands. | `string` | `"1.25.2-debian-11-r3"` | no |
| <a name="input_postgresql_chart_version"></a> [postgresql\_chart\_version](#input\_postgresql\_chart\_version) | The helm chart version of postgresql to use. | `string` | `"16.5.1"` | no |
| <a name="input_postgresql_tag"></a> [postgresql\_tag](#input\_postgresql\_tag) | The tag of the postgresql image to use. | `string` | `"17.4.0"` | no |
| <a name="input_profile"></a> [profile](#input\_profile) | AWS config profile used to upload images into ECR | `string` | `""` | no |
| <a name="input_region"></a> [region](#input\_region) | AWS region | `string` | n/a | yes |
| <a name="input_service_name"></a> [service\_name](#input\_service\_name) | The name of the service to be deployed in the EKS cluster. | `string` | `"service"` | no |
| <a name="input_utilities_tag"></a> [utilities\_tag](#input\_utilities\_tag) | Version tag for the docker image to use to execute kubectl commands. | `string` | `"1.0.3"` | no |

## Outputs

Expand Down
18 changes: 9 additions & 9 deletions copy_images.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@ locals {
keycloak_name = "keycloak/keycloak"
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")
kubectl_key = format("%v#%v", "bitnami/kubectl-debian", var.utilities_tag)
ent_ecr_source = format("%v.%v.%v.%v", var.eecr_account_id, "dkr.ecr", var.region, "amazonaws.com/ent-images")

image_config = [
{
enabled = true
dest_path = null
name = "keycloak/keycloak"
source_image = "keycloak/keycloak"
source_registry = "quay.io"
source_registry = format("%v/%v", local.ent_ecr_source, "quay")
source_tag = var.keycloak_tag
tag = var.keycloak_tag
},
{
enabled = true
dest_path = null
name = "bitnami/postgresql"
source_image = "bitnami/postgresql"
source_registry = "public.ecr.aws"
source_image = "postgresql/postgresql"
source_registry = format("%v/%v", local.ent_ecr_source, "ironbank")
source_tag = var.postgresql_tag
tag = var.postgresql_tag
},
{
enabled = true
dest_path = null
name = "bitnami/kubectl-debian"
source_image = "bitnami/kubectl"
source_registry = "docker.io"
source_tag = var.kubectl_image_tag
tag = var.kubectl_image_tag
source_image = "big-bang/utilities"
source_registry = format("%v/%v", local.ent_ecr_source, "ironbank")
source_tag = var.utilities_tag
tag = var.utilities_tag
},
]
}
Expand Down
File renamed without changes
12 changes: 8 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,17 @@ resource "kubernetes_namespace" "keycloak" {
}

module "service_account" {
# source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//service-account"
# tflint-ignore: terraform_module_pinned_source
source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//service-account"
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-config-job.git//service-account"

namespace = kubernetes_namespace.keycloak.metadata[0].name
}

module "pre_install" {
# source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//config-job"
# tflint-ignore: terraform_module_pinned_source
source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//config-job"
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-config-job.git//config-job"

namespace = kubernetes_namespace.keycloak.metadata[0].name
service_account_name = module.service_account.service_account_name
Expand Down Expand Up @@ -126,8 +128,9 @@ data "kubernetes_secret" "db-secrets" {
}

module "keycloak_db_config" {
# source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//config-job"
# tflint-ignore: terraform_module_pinned_source
source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//config-job"
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-config-job.git//config-job"

depends_on = [helm_release.keycloak-db]

Expand Down Expand Up @@ -185,8 +188,9 @@ module "ingress_resources" {

module "post_install" {
depends_on = [helm_release.keycloak]
# source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//config-job"
# tflint-ignore: terraform_module_pinned_source
source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-config-job.git//config-job"
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-config-job.git//config-job"

namespace = kubernetes_namespace.keycloak.metadata[0].name
service_account_name = module.service_account.service_account_name
Expand Down
65 changes: 35 additions & 30 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# tflint-ignore: terraform_unused_declarations

variable "account_id" {
description = "aws account number"
type = string
default = ""
}

variable "admin_email" {
description = "The email address of the admin of the default realm."
type = string
default = "luther.coleman.mcginty@census.gov"
}

variable "cluster_domain" {
description = "The domain name used to reference ingresses for the cluster."
type = string
Expand All @@ -15,22 +21,34 @@ variable "cluster_name" {
type = string
}

variable "default_realm" {
description = "The default realm to use to configure the environment."
type = string
default = "cluster-user"
}

variable "eecr_account_id" {
description = "enterpirse ecr source aws account number"
type = string
default = ""
}

variable "keycloak_namespace" {
description = "The namespace which will be created and into which keycloak will be deployed."
variable "keycloak_chart_version" {
description = "The version of the helm chart to install"
type = string
default = "7.0.1"
}

variable "keycloak_hostname" {
description = "The hostname used to access the keycloak service."
type = string
default = "keycloak"
}

variable "keycloak_chart_version" {
description = "The version of the helm chart to install"
variable "keycloak_namespace" {
description = "The namespace which will be created and into which keycloak will be deployed."
type = string
default = "7.0.1"
default = "keycloak"
}

variable "keycloak_tag" {
Expand All @@ -45,22 +63,16 @@ variable "keycloak_user" {
default = "keycloak"
}

variable "profile" {
description = "AWS config profile used to upload images into ECR"
type = string
default = ""
}

variable "keycloak_hostname" {
description = "The hostname used to access the keycloak service."
variable "utilities_tag" {
description = "Version tag for the docker image to use to execute kubectl commands."
type = string
default = "keycloak"
default = "1.0.3"
}

variable "service_name" {
description = "The name of the service to be deployed in the EKS cluster."
variable "profile" {
description = "AWS config profile used to upload images into ECR"
type = string
default = "service"
default = ""
}

variable "postgresql_chart_version" {
Expand All @@ -75,20 +87,13 @@ variable "postgresql_tag" {
default = "17.4.0"
}

variable "kubectl_image_tag" {
description = "Version tag for the docker image to use to execute kubectl commands."
type = string
default = "1.25.2-debian-11-r3"
}

variable "default_realm" {
description = "The default realm to use to configure the environment."
variable "region" {
description = "AWS region"
type = string
default = "cluster-user"
}

variable "admin_email" {
description = "The email address of the admin of the default realm."
variable "service_name" {
description = "The name of the service to be deployed in the EKS cluster."
type = string
default = "luther.coleman.mcginty@census.gov"
default = "service"
}

0 comments on commit 089a936

Please sign in to comment.