diff --git a/k8s.tf b/k8s.tf index 878dc85..3a00962 100644 --- a/k8s.tf +++ b/k8s.tf @@ -136,12 +136,12 @@ resource "vault_kubernetes_auth_backend_role" "backend_role" { } // KUBECONFIG FILE HANDLING -data "local_file" "input" { +data "local_file" "kubeconfig" { filename = var.kubeconfig_path } locals { - kubeconfig = yamldecode(file(var.kubeconfig_path)) + kubeconfig = yamldecode(data.local_file.kubeconfig.content) } data "kubernetes_secret" "vault" { diff --git a/provider.tf b/provider.tf index c78a591..dc74363 100644 --- a/provider.tf +++ b/provider.tf @@ -21,6 +21,12 @@ terraform { source = "hashicorp/helm" version = ">= 2.12.1" } + + local = { + source = "hashicorp/local" + version = "2.4.1" + } + } } diff --git a/variables.tf b/variables.tf index 548a728..4b5dd6c 100644 --- a/variables.tf +++ b/variables.tf @@ -50,7 +50,15 @@ variable "approle_roles" { description = "A list of approle definitions" } -variable "userPassPath" { default = "userpass" } +variable "userPassPath" { + type = string + default = "userpass" + description = "userpass" +} + + + + variable "user_list" { type = list(object({ path = string @@ -108,6 +116,20 @@ variable "vso_enabled" { default = true } -variable "createDefaultAdminPolicy" { default = false } -variable "enableUserPass" { default = false } -variable "enableApproleAuth" { default = false } +variable "enableApproleAuth" { + description = "Enable approle auth" + type = bool + default = false +} + +variable "createDefaultAdminPolicy" { + description = "Create default admin policy" + type = bool + default = false +} + +variable "enableUserPass" { + description = "Enable user pass" + type = bool + default = false +} \ No newline at end of file