Skip to content

Starting template for using Digital Ocean Terraform provider and Digital Ocean Spaces as a remote backend for terraform state.

Notifications You must be signed in to change notification settings

madjake/digital-ocean-spaces-backend-terraform

Repository files navigation

Digital Ocean Terraform Infastructure Provisioning

Stands up the infrastructure necessary to run a simple, single host with a floating IP. Terraform state is stored remotely in a Digital Ocean Spaces bucket.

I use this as a template and starting point for new infrastructure.

Setup

  1. Generate API key, spaces id and spaces secret key: https://cloud.digitalocean.com/account/api
  2. Create Spaces bucket. See terraform-backend/README.md for instructions.
  3. Configure terraform.tfvars to your liking
  4. Configure terraform.tfbackend with your desired backend .
  5. Run: ./bin/run_terraform.sh plan
  6. Verify plan looks correct.
  7. Run: ./bin/run_terraform.sh apply
  8. You now have a project and droplet setup.

Remote State

DO Spaces is s3 compatible so it's possible to use an s3 backend.

Comment out the terraform backend from main.tf if you don't want to use Digital Ocean Spaces. If you do this terraform state will need to be backed up some other way (commited to private repository or some other safe place).

About

Starting template for using Digital Ocean Terraform provider and Digital Ocean Spaces as a remote backend for terraform state.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published