Coder Social home page Coder Social logo

cyou-b / terraform.digitalocean.droplet Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 9 KB

This Terraform project simplifies the process of setting up a DigitalOcean droplet by leveraging the power of Terraform

License: MIT License

HCL 100.00%
digitalocean digitalocean-droplets digitalocean-projects terraform

terraform.digitalocean.droplet's Introduction

Cyou.b - terraform-digitalocean-droplet

This Terraform project simplifies the process of setting up a DigitalOcean droplet by leveraging the power of Terraform. It provides a well-organized approach to provisioning resources, making it easier for users to automate the deployment process.

Terraform Resources Used:

1. DigitalOcean Droplet

Resource: digitalocean_droplet.instance

Purpose: Creates a DigitalOcean droplet based on specified configurations, including image, region, size, and name.

Prerequisites:

DigitalOcean Account: You need an active DigitalOcean account to create and manage the droplet.

Terraform Installed: Ensure Terraform is installed on your local machine.

DigitalOcean API Token: Obtain a DigitalOcean API token and set it in the digitalocean_token variable.

Usage

  1. Clone the Repository
git clone https://github.com/cyou-b/terraform-staticsite.git
cd terraform-staticsite
  1. Configure main (Optional)
  • Configure main.tf if want to configure a S3 bucket backend to store terraform config.
  1. Set Terraform Variables

create tfvars file with data

# terraform.tfvars
digitalocean_token = "YOUR_DIGITALOCEAN_API_TOKEN"
droplet_image      = "ubuntu-22-04-x64"
droplet_name       = "your-droplet-name"
droplet_region     = "nyc1"
droplet_size       = "s-1vcpu-1gb"
  1. Initialize Terraform
terraform init
  1. Review Terraform Plan
terraform plan --var-file terraform.tfvars
  1. Apply Terraform Changes
terraform apply --var-file terraform.tfvars

After apply changes, will be necessary add DNS nameservers to you domain

  1. Cleanup (Optional)
terraform destroy

License

This project is licensed under the [License Name] License - see the LICENSE.md file for details.

terraform.digitalocean.droplet's People

Contributors

flaviomilan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.