You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To add a custom value, I am currently forced to copy the default value to my Terraform code, which could then cause inconsistencies when I change e.g. load_balancer_algorithm_type but forget to also update my custom nginx_values.
As you can see load_balancer_algorithm_type is set to least_connections, but the load-balancer.hetzner.cloud/algorithm-type annotation is set to round_robin.
To avoid this, one can add a local and use it for the module-variable and for the custom nginx_value:
It would be cool to have a way to add custom options to the default values (e.g. some kind of merging strategy?) without being forced to copy the default value.
The text was updated successfully, but these errors were encountered:
Description
Problem
The default value for the
nginx_values
local is based on a ton of locals and variables:terraform-hcloud-kube-hetzner/locals.tf
Lines 546 to 574 in dbcf426
Same goes for haproxy_values and traefik_values, etc.
To add a custom value, I am currently forced to copy the default value to my Terraform code, which could then cause inconsistencies when I change e.g.
load_balancer_algorithm_type
but forget to also update my customnginx_values
.Example
As you can see
load_balancer_algorithm_type
is set toleast_connections
, but theload-balancer.hetzner.cloud/algorithm-type
annotation is set toround_robin
.To avoid this, one can add a local and use it for the module-variable and for the custom
nginx_value
:That works, but it's quite some work, because tons of variables are used and they also use some locals that are based on calculations:
terraform-hcloud-kube-hetzner/locals.tf
Line 230 in dbcf426
terraform-hcloud-kube-hetzner/locals.tf
Line 233 in dbcf426
Idea
It would be cool to have a way to add custom options to the default values (e.g. some kind of merging strategy?) without being forced to copy the default value.
The text was updated successfully, but these errors were encountered: