Closed icarusfactor closed 5 years ago
You would typically provide the ssh keys as user_data
. I have not done it myself, but you would need cloudinit and pass in the config file - https://cloudinit.readthedocs.io/en/latest/topics/examples.html
Thanks! That's excellent that I can use cloudinit with terraform, I'm a user of Cloudinit with Openstack.
From your answer I am now just figuring out that I can have multiple tf files with multiple providers in the directory. Having one for virtualbox and one for cloudinit or even more for doing even more configurations. That is what I was after thanks.
I'm new to Terraform, glad to have a virtualbox provider for testing. It all installed it just fine,only issue was having to change the Virtualbox instances to nat from bridged on Debian host. But having the two example nodes installed ,how can I import my ssh keys to each of these nodes so I can log into them? This is not the vagrant version,just the Ubuntu version provided. Also, I would also like to create my own image to use with Terraform and would like to know the syntax for adding my keys into the tf file.