Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Invalid value for "path" parameter: no file exists at /root/.ssh/id_rsa.pub #19

Closed
sprusr7 opened this issue Dec 13, 2020 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@sprusr7
Copy link

sprusr7 commented Dec 13, 2020

I tried to run everything onto a new server and getting only 1 error this time on following command

[root@staging ~]# terraform validate

Error: Invalid function argument

  on .terraform/modules/cluster/vultr-ssh.tf line 3, in resource "vultr_ssh_key" "provisioner":
   3:   ssh_key = trimspace(file("~/.ssh/id_rsa.pub"))

Invalid value for "path" parameter: no file exists at /root/.ssh/id_rsa.pub;
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.

Following two files do not exist on my Centos server

~/.ssh/id_rsa.pub
~/.ssh/id_rsa

If I create empty files on the above paths then I get following errors when I run terraform apply.



Error: Error creating SSH key: Unable to create SSH Key: Invalid SSH key.  Keys should be in authorized_keys format

  on .terraform/modules/cluster/vultr-ssh.tf line 1, in resource "vultr_ssh_key" "provisioner":
   1: resource "vultr_ssh_key" "provisioner" {



Error: Error creating network: Not currently enabled on your account, enable on https://my.vultr.com/network/

  on .terraform/modules/cluster/vultr-vpc.tf line 1, in resource "vultr_network" "cluster_network":
   1: resource "vultr_network" "cluster_network" {


@sprusr7 sprusr7 added the bug Something isn't working label Dec 13, 2020
@ddymko
Copy link

ddymko commented Dec 13, 2020

You need to have an ssh key present on your machine in order for Condor to properly provision the control_plane and worker_nodes. Since you do not have a ssh key present on the machine it will fail during deployment.

As for the private networking issue you have to enable private networking on your account. https://my.vultr.com/network/

@sprusr7
Copy link
Author

sprusr7 commented Dec 13, 2020

Thanks, I am trying it now.

If I change the SSD to 128GB in variables.tf, will it give me a high frequency plan? Or is there another way to get high frequency plans?


variable "worker_plan" {
  type    = string
  default = "4096 MB RAM,80 GB SSD,3.00 TB BW"
}

@sprusr7
Copy link
Author

sprusr7 commented Dec 13, 2020

Also, how to delete the cluster properly?

@ddymko
Copy link

ddymko commented Dec 14, 2020

@sprusr7 if you want to change which plans the cluster gets deployed with you can change worker_plan - default: "4096 MB RAM,80 GB SSD,3.00 TB BW" please see the documentation for which params are available.

https://registry.terraform.io/modules/vultr/condor/vultr/latest

As for deletion that would be terraform destroy as this is a terraform module and uses all of the terraform commands.

@ddymko ddymko closed this as completed Dec 14, 2020
@enhering
Copy link

Hi. I'd like to ask if it would be possible to you to make a variable to hold the path to the ssh public key. The key I have at the default location is used for other purposes and I would not like to keep it decrypted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants