Skip to content

Commit

Permalink
fix: include helm parameters when not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jaygridley committed Jan 17, 2024
1 parent b810f11 commit af3ed62
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions argo.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ locals {
"repoURL" : var.helm_repo_url
"chart" : var.helm_chart_name
"targetRevision" : var.helm_chart_version
"helm" : {
"releaseName" : var.helm_release_name
"parameters" : [for k, v in var.settings : tomap({ "forceString" : true, "name" : k, "value" : v })]
"values" : var.enabled ? data.utils_deep_merge_yaml.values[0].output : ""
}
"helm" : merge(
{
"releaseName" : var.helm_release_name
"values" : var.enabled ? data.utils_deep_merge_yaml.values[0].output : ""
},
length(var.settings) > 0 ? {
"parameters" : [for k, v in var.settings : tomap({ "forceString" : true, "name" : k, "value" : v })]
} : {}
)
}
"destination" : {
"server" : var.argo_destination_server
Expand Down

0 comments on commit af3ed62

Please sign in to comment.