mirror of
https://github.com/2martens/terraform.git
synced 2026-10-17 15:26:50 +02:00
Turned allowed namespaces into variable
This commit is contained in:
@@ -62,4 +62,5 @@ module "test_cluster" {
|
|||||||
client_id : var.vault_client_id
|
client_id : var.vault_client_id
|
||||||
client_secret : var.vault_client_secret
|
client_secret : var.vault_client_secret
|
||||||
}
|
}
|
||||||
|
vault_allowed_namespaces = ["wahlrecht"]
|
||||||
}
|
}
|
||||||
@@ -112,6 +112,7 @@ resource "hcloud_server" "manager" {
|
|||||||
cluster_setup_values : base64encode(templatefile("${path.module}/templates/helm/cluster-setup-values.yaml", {
|
cluster_setup_values : base64encode(templatefile("${path.module}/templates/helm/cluster-setup-values.yaml", {
|
||||||
client_id : var.vault_service_principal.client_id
|
client_id : var.vault_service_principal.client_id
|
||||||
client_secret : var.vault_service_principal.client_secret
|
client_secret : var.vault_service_principal.client_secret
|
||||||
|
allowed_namespaces : var.vault_allowed_namespaces
|
||||||
}))
|
}))
|
||||||
argocd_ha_values : base64encode(file("${path.module}/templates/helm/argocd-values-ha.yaml"))
|
argocd_ha_values : base64encode(file("${path.module}/templates/helm/argocd-values-ha.yaml"))
|
||||||
cluster_setup : base64encode(templatefile("${path.module}/templates/scripts/cluster-setup.sh", {
|
cluster_setup : base64encode(templatefile("${path.module}/templates/scripts/cluster-setup.sh", {
|
||||||
|
|||||||
@@ -2,4 +2,7 @@ vault:
|
|||||||
enabled: true
|
enabled: true
|
||||||
clientId: ${client_id}
|
clientId: ${client_id}
|
||||||
clientSecret: ${client_secret}
|
clientSecret: ${client_secret}
|
||||||
applicationNamespaces: []
|
applicationNamespaces:
|
||||||
|
%{ for namespace in allowed_namespaces ~}
|
||||||
|
- ${namespace}
|
||||||
|
%{ endfor ~}
|
||||||
@@ -153,4 +153,10 @@ variable "vault_service_principal" {
|
|||||||
client_secret : string
|
client_secret : string
|
||||||
})
|
})
|
||||||
sensitive = true
|
sensitive = true
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "vault_allowed_namespaces" {
|
||||||
|
description = "Namespaces that are allowed to access secrets from the Vault"
|
||||||
|
type = list(string)
|
||||||
|
default = []
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user