evindunn / terraform-k8s

Kubernetes cluster using terraform, libvirt, and rke
3 stars 1 forks source link

Invalid value for "path" parameter: no file exists at ./templates/rke.yml #1

Open maksim-se opened 3 years ago

maksim-se commented 3 years ago

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

  1. git clone https://github.com/evindunn/terraform_k8s.git
  2. terraform init
  3. terraform apply --var k8s_node_count=3 --var ceph_node_count=3

Specifications

evindunn commented 2 years ago

Thanks @maksim-se, must've forgot to commit rke. I'll push it.