Skip to content

Commit

Permalink
need file first
Browse files Browse the repository at this point in the history
  • Loading branch information
jerowe committed Oct 12, 2021
1 parent a44ef66 commit 1fd4ba9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
11 changes: 1 addition & 10 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
resource "random_string" "computed_values" {
length = 10
special = false
lower = true
upper = false
override_special = ""
}

locals {
helm_values_files = var.helm_values_files
helm_values_merged_file = abspath("${var.helm_values_dir}/computed-${random_string.computed_values.result}-values.yaml")
}

resource "null_resource" "merge_yamls" {
Expand All @@ -23,7 +14,7 @@ resource "null_resource" "merge_yamls" {
%{for value_file in local.helm_values_files~}
${value_file} \
%{endfor~}
--output ${local.helm_values_merged_file}
--output ${var.helm_release_merged_values_file}
EOT
}
}
7 changes: 1 addition & 6 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
output "helm_values_merged_file" {
description = "Merged values file"
value = local.helm_values_merged_file
}

output "helm_values_files" {
description = "Listing the values file for debugging"
value = var.helm_values_files
Expand All @@ -20,6 +15,6 @@ output "merge_helm_values_files_command" {
%{for value_file in local.helm_values_files~}
${value_file} \
%{endfor~}
--output ${local.helm_values_merged_file}
--output ${var.helm_release_merged_values_file}
EOT
}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ variable "helm_values_dir" {
type = string
description = "Directory to store additional daskhub values files."
}

variable "helm_release_merged_values_file" {
type = string
description = "Path to merged helm files. This path must exist before the module is invoked."
}

0 comments on commit 1fd4ba9

Please sign in to comment.