HomelabOS can spin up cloud servers for you if you don't have physical hardware servers you can use at your house.
Create a DO account, login, click
API on the left menu, and generate a
new access token. Name it
Terraform, save it, and copy the value into
settings/vault.yml file under
do_access_token:. If the file looks garbled, make sure you run
If you are already using DO you may receive an error around your SSH key already existing. Login to DO, go to the Security page, and delete the SSH key. Terraform will re-add it and then know how to manage it correctly.
Destroying Terraform Resources¶
hlos terraform_destroy to destroy the resources Terraform created.
422 SSH Key is already in use on your account¶
You have already added your SSH key to your account, so Terraform can't manage it properly.
ssh-keygen -l -E md5 -f ~/.ssh/id_rsa.pub then go to your DO dashboard, click your photo in the top right, then Profile. Now click Security, find the key that matches the fingerprint that was output by the command given, and delete it. Now run
hlos terraform again.