You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
768 B

  1. Using Terraform
  2. ===============
  3. This is a `Terraform <https://www.terraform.io/>`__ configuration that sets up DigitalOcean droplets.
  4. Prerequisites
  5. -------------
  6. - Install `HashiCorp Terraform <https://www.terraform.io>`__ on a linux machine.
  7. - Create a `DigitalOcean API token <https://cloud.digitalocean.com/settings/api/tokens>`__ with read and write capability.
  8. - Create SSH keys
  9. Build
  10. -----
  11. ::
  12. export DO_API_TOKEN="abcdef01234567890abcdef01234567890"
  13. export SSH_KEY_FILE="$HOME/.ssh/id_rsa.pub"
  14. terraform init
  15. terraform apply -var DO_API_TOKEN="$DO_API_TOKEN" -var SSH_KEY_FILE="$SSH_KEY_FILE"
  16. At the end you will get a list of IP addresses that belongs to your new droplets.
  17. Destroy
  18. -------
  19. Run the below:
  20. ::
  21. terraform destroy