Reference architectures to showcase how users can leverage DigitalOcean's robust cloud platform to build resilient, distributed systems at scale.
- Terraform installed on your machine
- DigitalOcean Account - Sign up here
- DigitalOcean API Token
-
Clone this repository
git clone https://github.com/digitalocean/scale-with-simplicity.git cd infrastructure
-
Create a
project.tfvars
file with your DigitalOcean API token:cp project.tfvars.example project.tfvars # Add your DO TOKEN do_token = "your-digitalocean-api-token"
Note: Never commit this file to version control!
-
Initialize Terraform:
terraform init
-
Review the planned changes:
terraform plan -var-file=project.tfvars -out project.out
-
Apply the changes:
terraform apply "project.out"
-
To destroy the infrastructure:
terraform destroy -var-file="project.tfvars"
├── infrastructure/ # Terraform infrastructure code
│ ├── main.tf # Main architecture configuration
│ ├── variables.tf # Architecture variables
│ ├── outputs.tf # Terraform outputs
│ ├── provider.tf # Provider configuration (DigitalOcean)
│ ├── vpc.tf # VPC configuration
│ ├── postgres.tf # PostgreSQL database configuration
│ ├── spaces.tf # DigitalOcean Spaces configuration
│ └── project.tfvars.example # Example project variables file
- Never commit your
project.tfvars
file or any files containing sensitive information - Keep your DigitalOcean API token secure.
- Review the planned infrasture changes before applying them.