Skip to content

Commit

Permalink
fix!: remove the Helm diff
Browse files Browse the repository at this point in the history
This feature was controversial within the team and for that reason a variable to activate was added before. However, this feature was not propagated to the other modules, so we decided as a team to remove it altogether for consistency between modules.
  • Loading branch information
lentidas committed Nov 3, 2023
1 parent 79ad8de commit af81c2c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
16 changes: 0 additions & 16 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,6 @@ data "utils_deep_merge_yaml" "values" {
append_list = var.deep_merge_append_list
}

data "helm_template" "this" {
count = var.show_manifest_diff ? 1 : 0

name = "kube-prometheus-stack"
namespace = var.namespace
chart = "${path.module}/charts/kube-prometheus-stack"
values = [sensitive(data.utils_deep_merge_yaml.values.output)]
}

resource "null_resource" "k8s_resources" {
count = var.show_manifest_diff ? 1 : 0

triggers = data.helm_template.this[0].manifests
}

resource "argocd_application" "this" {
metadata {
name = var.destination_cluster != "in-cluster" ? "kube-prometheus-stack-${var.destination_cluster}" : "kube-prometheus-stack"
Expand Down Expand Up @@ -166,4 +151,3 @@ resource "null_resource" "this" {
resource.argocd_application.this,
]
}

9 changes: 0 additions & 9 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@ variable "deep_merge_append_list" {
default = false
}

variable "show_manifest_diff" {
description = <<-EOT
A boolean to enable/disable outputting Helm templates on the Terraform plan.
This is useful for debugging purposes only. *Make sure no secrets appear in the Kubernetes manifests before setting this flag, otherwise they will be exposed in your Terraform plan.*
EOT
type = bool
default = false
}

variable "app_autosync" {
description = "Automated sync options for the Argo CD Application resource."
type = object({
Expand Down

0 comments on commit af81c2c

Please sign in to comment.