[X] I have already searched this project's issues to determine if a bug report has already been made.
What happened?
On edge.24-10-21, we have newly deployed kube_monitoring successfully with ingress disabled. When we enable ingress and attempt to init, plan, or apply, we receive the attached following error. Our production environment already had monitoring deployed from a previous release.
We are considering pinning kube_monitoring to an earlier edge version to attempt to deploy it (though the module is in alpha, having Grafana and Loki is still incredibly useful), but are holding off in order to provide more details if asked.
Steps to Reproduce
Deploy kube_monitoring with ingress disabled.
Attempt to init, plan, or apply kube_monitoring with ingress enabled.
Relevant log output
╷
│ Error: Invalid for_each argument
│
│ on ../kube_ingress/main.tf line 275, in resource "kubectl_manifest" "ingress":
│ 275: for_each = var.cdn_mode_enabled ? local.ingress_configs_with_cdn : local.ingress_configs
│ ├────────────────
│ │ local.ingress_configs will be known only after apply
│ │ local.ingress_configs_with_cdn will be known only after apply
│ │ var.cdn_mode_enabled is false
│
│ The "for_each" map includes keys derived from resource attributes that
│ cannot be determined until apply, and so OpenTofu cannot determine the full
│ set of keys that will identify the instances of this resource.
│
│ When working with unknown values in for_each, it's better to define the map
│ keys statically in your configuration and place apply-time results only in
│ the map values.
│
│ Alternatively, you could use the -target planning option to first apply
│ only the resources that the for_each value depends on, and then apply a
│ second time to fully converge.
Prior Search
What happened?
On
edge.24-10-21
, we have newly deployedkube_monitoring
successfully with ingress disabled. When we enable ingress and attempt toinit
,plan
, orapply
, we receive the attached following error. Our production environment already had monitoring deployed from a previous release.We are considering pinning
kube_monitoring
to an earlier edge version to attempt to deploy it (though the module is in alpha, having Grafana and Loki is still incredibly useful), but are holding off in order to provide more details if asked.Steps to Reproduce
Deploy kube_monitoring with ingress disabled.
Attempt to init, plan, or apply kube_monitoring with ingress enabled.
Relevant log output