Skip to content

Commit 66d2ffd

Browse files
committed
Mark kubeconfig content as sensitive
1 parent fbeb1ab commit 66d2ffd

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Generate kubeconfig files with Terraform
66
```hcl
77
module "kubeconfig" {
88
source = "redeux/kubeconfig/kubernetes"
9-
version = "0.0.1"
9+
version = "0.0.2"
1010
1111
current_context = "kind-kind"
1212
clusters = [{

main.tf

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
resource "local_file" "kubeconfig" {
2-
content = templatefile("${path.module}/kubeconfig-template.tpl", { contexts = var.contexts, clusters = var.clusters, users = var.users, colors = var.colors, current_context = var.current_context })
3-
filename = "./${var.filename}"
2+
sensitive_content = templatefile("${path.module}/kubeconfig-template.tpl", { contexts = var.contexts, clusters = var.clusters, users = var.users, colors = var.colors, current_context = var.current_context })
3+
filename = "./${var.filename}"
44
}
55

66
output "kubeconfig_path" {
7-
value = local_file.kubeconfig.filename
7+
value = local_file.kubeconfig.filename
88
description = "Path to the kubeconfig file"
99
}
1010

1111
output "kubeconfig_content" {
12-
value = yamldecode(local_file.kubeconfig.content)
12+
value = yamldecode(local_file.kubeconfig.sensitive_content)
1313
description = "HCL representation of kubeconfig file contents"
14+
sensitive = true
1415
}

0 commit comments

Comments
 (0)