Skip to content

Commit e4dfc2b

Browse files
authoredJun 11, 2024··
Merge pull request #50 from spring-financial-group/feat/clientID-bootjob-envvars
feat: add CLIENT_ID to jx-boot-job-env-vars
2 parents 8e5a7bc + 6cefc57 commit e4dfc2b

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed
 

‎local.tf

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ locals {
1717
job_secret_env_vars_vault = var.key_vault_enabled ? {
1818
AZURE_TENANT_ID = module.secrets.tenant_id
1919
AZURE_SUBSCRIPTION_ID = module.secrets.subscription_id
20+
AZURE_CLIENT_ID = module.secrets.client_id
2021
} : {}
2122

2223
job_secret_env_vars_ssa = var.server_side_apply_enabled ? {

‎main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ module "secrets" {
115115
source = "./terraform-jx-azurekeyvault"
116116
enabled = var.key_vault_enabled
117117
principal_id = module.cluster.kubelet_identity_id
118+
kubelet_client_id = module.cluster.kubelet_client_id
118119
cluster_name = local.cluster_name
119120
resource_group_name = var.key_vault_resource_group_name
120121
key_vault_name = var.key_vault_name

‎terraform-jx-azurekeyvault/outputs.tf

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ output "tenant_id" {
77
output "subscription_id" {
88
value = var.enabled ? data.azurerm_subscription.current.subscription_id : ""
99
}
10+
output "client_id" {
11+
value = var.enabled ? var.kubelet_client_id : ""
12+
}

‎terraform-jx-azurekeyvault/variables.tf

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ variable "principal_id" {
2929
type = string
3030
description = "The id of the service principal that should be granted permission on the key vault"
3131
}
32+
variable "kubelet_client_id" {
33+
type = string
34+
description = "The client id of the kubelet identity used when authenticating to the key vault"
35+
}
3236
variable "secret_map" {
3337
type = map(string)
3438
description = "Map of secret keys and values to store in Azure Key Vault"

0 commit comments

Comments
 (0)
Please sign in to comment.