~/projects/terraform_k8s >>> terraform apply --var k8s_node_count=3 --var ceph_node_count=3 [1]
╷
│ Error: Invalid function argument
│
│ on auth.tf line 27, in resource "local_file" "rke_config":
│ 26: content = templatefile(
│ 27: "${path.module}/templates/rke.yml",
│ 28: {
│ 29: ssh_priv_key_path = local_file.cluster_ssh_priv.filename
│ 30: node_count = var.k8s_node_count
│ 31: domain = local.domain
│ 32: }
│ 33: )
│ ├────────────────
│ │ path.module is "."
│
│ Invalid value for "path" parameter: no file exists at ./templates/rke.yml; this function works only with files that
│ are distributed as part of the configuration source code, so if this file will be created by a resource in this
│ configuration you must instead obtain this result from an attribute of that resource.
╵
~/projects/terraform_k8s >>>
Hi. Maybe there is a missing ./templates/rke.yml.
Actual Behavior
~/projects/terraform_k8s >>> terraform apply --var k8s_node_count=3 --var ceph_node_count=3 [1] ╷ │ Error: Invalid function argument │ │ on auth.tf line 27, in resource "local_file" "rke_config": │ 26: content = templatefile( │ 27: "${path.module}/templates/rke.yml", │ 28: { │ 29: ssh_priv_key_path = local_file.cluster_ssh_priv.filename │ 30: node_count = var.k8s_node_count │ 31: domain = local.domain │ 32: } │ 33: ) │ ├──────────────── │ │ path.module is "." │ │ Invalid value for "path" parameter: no file exists at ./templates/rke.yml; this function works only with files that │ are distributed as part of the configuration source code, so if this file will be created by a resource in this │ configuration you must instead obtain this result from an attribute of that resource. ╵ ~/projects/terraform_k8s >>>
Steps to Reproduce the Problem
Specifications