Skip to content

Commit

Permalink
Set kubeconfig and asset_dist as sensitive
Browse files Browse the repository at this point in the history
* Mark `kubeconfig` and `asset_dist` as `sensitive` to
prevent the Terraform CLI displaying these values, esp.
for CI systems
* In particular, external tools or tfvars style uses (not
recommended) reportedly display all outputs and are improved
by setting sensitive
* For Terraform v0.14, outputs referencing sensitive fields
must also be annotated as sensitive

Closes #884
  • Loading branch information
dghubble committed Nov 23, 2020
1 parent 9f94ab6 commit c0347ca
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 28 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Notable changes between versions.

* Add input variable validations ([#880](https://github.com/poseidon/typhoon/pull/880))
* Require Terraform v0.13+ ([migration guide](https://typhoon.psdn.io/topics/maintenance/#terraform-versions))
* Set output sensitive to suppress console display for some cases ([#885](https://github.com/poseidon/typhoon/pull/885))

### AWS

Expand Down
9 changes: 6 additions & 3 deletions aws/fedora-coreos/kubernetes/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
output "kubeconfig-admin" {
value = module.bootstrap.kubeconfig-admin
value = module.bootstrap.kubeconfig-admin
sensitive = true
}

# Outputs for Kubernetes Ingress
Expand Down Expand Up @@ -32,7 +33,8 @@ output "worker_security_groups" {
}

output "kubeconfig" {
value = module.bootstrap.kubeconfig-kubelet
value = module.bootstrap.kubeconfig-kubelet
sensitive = true
}

# Outputs for custom load balancing
Expand All @@ -55,6 +57,7 @@ output "worker_target_group_https" {
# Outputs for debug

output "assets_dist" {
value = module.bootstrap.assets_dist
value = module.bootstrap.assets_dist
sensitive = true
}

9 changes: 6 additions & 3 deletions aws/flatcar-linux/kubernetes/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
output "kubeconfig-admin" {
value = module.bootstrap.kubeconfig-admin
value = module.bootstrap.kubeconfig-admin
sensitive = true
}

# Outputs for Kubernetes Ingress
Expand Down Expand Up @@ -32,7 +33,8 @@ output "worker_security_groups" {
}

output "kubeconfig" {
value = module.bootstrap.kubeconfig-kubelet
value = module.bootstrap.kubeconfig-kubelet
sensitive = true
}

# Outputs for custom load balancing
Expand All @@ -55,6 +57,7 @@ output "worker_target_group_https" {
# Outputs for debug

output "assets_dist" {
value = module.bootstrap.assets_dist
value = module.bootstrap.assets_dist
sensitive = true
}

9 changes: 6 additions & 3 deletions azure/fedora-coreos/kubernetes/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
output "kubeconfig-admin" {
value = module.bootstrap.kubeconfig-admin
value = module.bootstrap.kubeconfig-admin
sensitive = true
}

# Outputs for Kubernetes Ingress
Expand Down Expand Up @@ -32,7 +33,8 @@ output "security_group_id" {
}

output "kubeconfig" {
value = module.bootstrap.kubeconfig-kubelet
value = module.bootstrap.kubeconfig-kubelet
sensitive = true
}

# Outputs for custom firewalling
Expand Down Expand Up @@ -61,6 +63,7 @@ output "backend_address_pool_id" {
# Outputs for debug

output "assets_dist" {
value = module.bootstrap.assets_dist
value = module.bootstrap.assets_dist
sensitive = true
}

9 changes: 6 additions & 3 deletions azure/flatcar-linux/kubernetes/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
output "kubeconfig-admin" {
value = module.bootstrap.kubeconfig-admin
value = module.bootstrap.kubeconfig-admin
sensitive = true
}

# Outputs for Kubernetes Ingress
Expand Down Expand Up @@ -32,7 +33,8 @@ output "security_group_id" {
}

output "kubeconfig" {
value = module.bootstrap.kubeconfig-kubelet
value = module.bootstrap.kubeconfig-kubelet
sensitive = true
}

# Outputs for custom firewalling
Expand Down Expand Up @@ -61,6 +63,7 @@ output "backend_address_pool_id" {
# Outputs for debug

output "assets_dist" {
value = module.bootstrap.assets_dist
value = module.bootstrap.assets_dist
sensitive = true
}

6 changes: 4 additions & 2 deletions bare-metal/fedora-coreos/kubernetes/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
output "kubeconfig-admin" {
value = module.bootstrap.kubeconfig-admin
value = module.bootstrap.kubeconfig-admin
sensitive = true
}

# Outputs for debug

output "assets_dist" {
value = module.bootstrap.assets_dist
value = module.bootstrap.assets_dist
sensitive = true
}

6 changes: 4 additions & 2 deletions bare-metal/flatcar-linux/kubernetes/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
output "kubeconfig-admin" {
value = module.bootstrap.kubeconfig-admin
value = module.bootstrap.kubeconfig-admin
sensitive = true
}

# Outputs for debug

output "assets_dist" {
value = module.bootstrap.assets_dist
value = module.bootstrap.assets_dist
sensitive = true
}

9 changes: 6 additions & 3 deletions digital-ocean/fedora-coreos/kubernetes/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
output "kubeconfig-admin" {
value = module.bootstrap.kubeconfig-admin
value = module.bootstrap.kubeconfig-admin
sensitive = true
}

# Outputs for Kubernetes Ingress
Expand Down Expand Up @@ -32,7 +33,8 @@ output "workers_ipv6" {
# Outputs for worker pools

output "kubeconfig" {
value = module.bootstrap.kubeconfig-kubelet
value = module.bootstrap.kubeconfig-kubelet
sensitive = true
}

# Outputs for custom firewalls
Expand All @@ -57,6 +59,7 @@ output "vpc_id" {
# Outputs for debug

output "assets_dist" {
value = module.bootstrap.assets_dist
value = module.bootstrap.assets_dist
sensitive = true
}

9 changes: 6 additions & 3 deletions digital-ocean/flatcar-linux/kubernetes/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
output "kubeconfig-admin" {
value = module.bootstrap.kubeconfig-admin
value = module.bootstrap.kubeconfig-admin
sensitive = true
}

# Outputs for Kubernetes Ingress
Expand Down Expand Up @@ -32,7 +33,8 @@ output "workers_ipv6" {
# Outputs for worker pools

output "kubeconfig" {
value = module.bootstrap.kubeconfig-kubelet
value = module.bootstrap.kubeconfig-kubelet
sensitive = true
}

# Outputs for custom firewalls
Expand All @@ -57,6 +59,7 @@ output "vpc_id" {
# Outputs for debug

output "assets_dist" {
value = module.bootstrap.assets_dist
value = module.bootstrap.assets_dist
sensitive = true
}

9 changes: 6 additions & 3 deletions google-cloud/fedora-coreos/kubernetes/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
output "kubeconfig-admin" {
value = module.bootstrap.kubeconfig-admin
value = module.bootstrap.kubeconfig-admin
sensitive = true
}

# Outputs for Kubernetes Ingress
Expand All @@ -21,7 +22,8 @@ output "network_name" {
}

output "kubeconfig" {
value = module.bootstrap.kubeconfig-kubelet
value = module.bootstrap.kubeconfig-kubelet
sensitive = true
}

# Outputs for custom firewalling
Expand All @@ -45,6 +47,7 @@ output "worker_target_pool" {
# Outputs for debug

output "assets_dist" {
value = module.bootstrap.assets_dist
value = module.bootstrap.assets_dist
sensitive = true
}

9 changes: 6 additions & 3 deletions google-cloud/flatcar-linux/kubernetes/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
output "kubeconfig-admin" {
value = module.bootstrap.kubeconfig-admin
value = module.bootstrap.kubeconfig-admin
sensitive = true
}

# Outputs for Kubernetes Ingress
Expand All @@ -21,7 +22,8 @@ output "network_name" {
}

output "kubeconfig" {
value = module.bootstrap.kubeconfig-kubelet
value = module.bootstrap.kubeconfig-kubelet
sensitive = true
}

# Outputs for custom firewalling
Expand All @@ -45,6 +47,7 @@ output "worker_target_pool" {
# Outputs for debug

output "assets_dist" {
value = module.bootstrap.assets_dist
value = module.bootstrap.assets_dist
sensitive = true
}

0 comments on commit c0347ca

Please sign in to comment.