diff --git a/main.tf b/main.tf index 8bad20f..aa0b856 100644 --- a/main.tf +++ b/main.tf @@ -1,5 +1,15 @@ +resource "random_string" "computed_values" { + count = length(var.helm_release_merged_values_file) == 0 ? 1 : 0 + length = 10 + special = false + lower = true + upper = false + override_special = "" +} + locals { helm_values_files = var.helm_values_files + helm_release_merged_values_file = length(var.helm_release_merged_values_file) == 0 ? abspath("${var.helm_values_dir}/computed-${random_string.computed_values[0].result}-values.yaml") : var.helm_release_merged_values_file } resource "null_resource" "merge_yamls" { @@ -8,13 +18,14 @@ resource "null_resource" "merge_yamls" { } provisioner "local-exec" { command = <