Skip to content

Commit

Permalink
feat: INFRA-764 Added vault agent to zeppelin
Browse files Browse the repository at this point in the history
  • Loading branch information
Issam committed Nov 27, 2024
1 parent 8fadfe9 commit e095263
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
19 changes: 19 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ locals {
filename = "fluent_bit.cfg"
content_type = "text/cloud-config"
content = module.fluentbit_configs.configuration
}] : [],
var.vault_agent.enabled ? [{
filename = "vault_agent.cfg"
content_type = "text/cloud-config"
content = module.vault_agent_configs.configuration
}] : []
)
}
Expand Down Expand Up @@ -79,6 +84,20 @@ module "fluentbit_configs" {
}
}

module "vault_agent_configs" {
source = "git::https://github.com/Ferlab-Ste-Justine/terraform-cloudinit-templates.git//vault-agent?ref=feat/vault-agent"
install_dependencies = var.vault_agent.install_dependencies
vault_agent = {
enabled = var.vault_agent.enabled
auth_method = var.vault_agent.auth_method
vault_address = var.vault_agent.vault_address
vault_ca_cert = var.vault_agent.vault_ca_cert
templates = var.vault_agent.templates
agent_config = var.vault_agent.agent_config
release_version = var.vault_agent.release_version
}
}

data "template_cloudinit_config" "zeppelin" {
gzip = true
base64_encode = true
Expand Down
36 changes: 36 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,40 @@ variable "fluentbit" {
ca_cert = ""
}
}
}

variable "vault_agent" {
description = "Configuration for Vault Agent"
type = object({
enabled = bool
install_dependencies = bool
auth_method = object({
type = string
config = map(string)
})
vault_address = string
vault_ca_cert = string
templates = list(object({
source_path = string
destination_path = string
service_name = string
secret_path = string
secret_key = string
}))
agent_config = string
release_version = string
})
default = {
enabled = false
install_dependencies = true
auth_method = {
type = "approle"
config = {}
}
vault_address = ""
vault_ca_cert = ""
templates = []
agent_config = ""
release_version = ""
}
}

0 comments on commit e095263

Please sign in to comment.