Add DO project and droplets Terraform config
This commit is contained in:
parent
e899c3e85e
commit
f6ce08450a
12
mgmt/do-project-jeremydormitzer/main.tf
Normal file
12
mgmt/do-project-jeremydormitzer/main.tf
Normal file
@ -0,0 +1,12 @@
|
||||
provider "digitalocean" {
|
||||
token = var.do_token
|
||||
spaces_access_id = var.spaces_access_id
|
||||
spaces_secret_key = var.spaces_secret_key
|
||||
}
|
||||
|
||||
resource "digitalocean_project" "jeremy_dormitzer" {
|
||||
name = "jeremy.dormitzer"
|
||||
environment = "Production"
|
||||
description = "Personal infrastructure"
|
||||
purpose = "Personal infrastructure"
|
||||
}
|
18
mgmt/do-project-jeremydormitzer/terraform.tf
Normal file
18
mgmt/do-project-jeremydormitzer/terraform.tf
Normal file
@ -0,0 +1,18 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
digitalocean = {
|
||||
source = "digitalocean/digitalocean"
|
||||
version = "~> 2.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
backend "s3" {
|
||||
skip_credentials_validation = true
|
||||
skip_metadata_api_check = true
|
||||
# Need to specify an AWS region to stop Terraform complaining
|
||||
region = "us-east-1"
|
||||
endpoint = "nyc3.digitaloceanspaces.com"
|
||||
bucket = "jdormit-tf-state"
|
||||
key = "mgmt/do-project-jeremydormitzer.tfstate"
|
||||
}
|
||||
}
|
11
mgmt/do-project-jeremydormitzer/variables.tf
Normal file
11
mgmt/do-project-jeremydormitzer/variables.tf
Normal file
@ -0,0 +1,11 @@
|
||||
variable "do_token" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "spaces_access_id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "spaces_secret_key" {
|
||||
type = string
|
||||
}
|
13
prod/git-jeremydormitzer-com/main.tf
Normal file
13
prod/git-jeremydormitzer-com/main.tf
Normal file
@ -0,0 +1,13 @@
|
||||
provider "digitalocean" {
|
||||
token = var.do_token
|
||||
spaces_access_id = var.spaces_access_id
|
||||
spaces_secret_key = var.spaces_secret_key
|
||||
}
|
||||
|
||||
resource "digitalocean_droplet" "git_jeremydormitzer_com" {
|
||||
name = "git.jeremydormitzer.com"
|
||||
image = "41695378"
|
||||
region = "nyc3"
|
||||
size = "s-1vcpu-1gb"
|
||||
backups = true
|
||||
}
|
18
prod/git-jeremydormitzer-com/terraform.tf
Normal file
18
prod/git-jeremydormitzer-com/terraform.tf
Normal file
@ -0,0 +1,18 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
digitalocean = {
|
||||
source = "digitalocean/digitalocean"
|
||||
version = "~> 2.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
backend "s3" {
|
||||
skip_credentials_validation = true
|
||||
skip_metadata_api_check = true
|
||||
# Need to specify an AWS region to stop Terraform complaining
|
||||
region = "us-east-1"
|
||||
endpoint = "nyc3.digitaloceanspaces.com"
|
||||
bucket = "jdormit-tf-state"
|
||||
key = "prod/git-jeremydormitzer-com.tfstate"
|
||||
}
|
||||
}
|
11
prod/git-jeremydormitzer-com/variables.tf
Normal file
11
prod/git-jeremydormitzer-com/variables.tf
Normal file
@ -0,0 +1,11 @@
|
||||
variable "do_token" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "spaces_access_id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "spaces_secret_key" {
|
||||
type = string
|
||||
}
|
13
prod/jdormit-website/main.tf
Normal file
13
prod/jdormit-website/main.tf
Normal file
@ -0,0 +1,13 @@
|
||||
provider "digitalocean" {
|
||||
token = var.do_token
|
||||
spaces_access_id = var.spaces_access_id
|
||||
spaces_secret_key = var.spaces_secret_key
|
||||
}
|
||||
|
||||
resource "digitalocean_droplet" "jdormit_website" {
|
||||
name = "jdormit-website"
|
||||
image = "50901536"
|
||||
region = "nyc1"
|
||||
size = "s-1vcpu-1gb"
|
||||
backups = true
|
||||
}
|
18
prod/jdormit-website/terraform.tf
Normal file
18
prod/jdormit-website/terraform.tf
Normal file
@ -0,0 +1,18 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
digitalocean = {
|
||||
source = "digitalocean/digitalocean"
|
||||
version = "~> 2.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
backend "s3" {
|
||||
skip_credentials_validation = true
|
||||
skip_metadata_api_check = true
|
||||
# Need to specify an AWS region to stop Terraform complaining
|
||||
region = "us-east-1"
|
||||
endpoint = "nyc3.digitaloceanspaces.com"
|
||||
bucket = "jdormit-tf-state"
|
||||
key = "prod/jdormit-website.tfstate"
|
||||
}
|
||||
}
|
11
prod/jdormit-website/variables.tf
Normal file
11
prod/jdormit-website/variables.tf
Normal file
@ -0,0 +1,11 @@
|
||||
variable "do_token" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "spaces_access_id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "spaces_secret_key" {
|
||||
type = string
|
||||
}
|
13
prod/justin-ghost-site/main.tf
Normal file
13
prod/justin-ghost-site/main.tf
Normal file
@ -0,0 +1,13 @@
|
||||
provider "digitalocean" {
|
||||
token = var.do_token
|
||||
spaces_access_id = var.spaces_access_id
|
||||
spaces_secret_key = var.spaces_secret_key
|
||||
}
|
||||
|
||||
resource "digitalocean_droplet" "justin_ghost_site" {
|
||||
name = "justin-ghost-site"
|
||||
image = "53296993"
|
||||
region = "nyc3"
|
||||
size = "s-1vcpu-1gb"
|
||||
backups = true
|
||||
}
|
18
prod/justin-ghost-site/terraform.tf
Normal file
18
prod/justin-ghost-site/terraform.tf
Normal file
@ -0,0 +1,18 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
digitalocean = {
|
||||
source = "digitalocean/digitalocean"
|
||||
version = "~> 2.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
backend "s3" {
|
||||
skip_credentials_validation = true
|
||||
skip_metadata_api_check = true
|
||||
# Need to specify an AWS region to stop Terraform complaining
|
||||
region = "us-east-1"
|
||||
endpoint = "nyc3.digitaloceanspaces.com"
|
||||
bucket = "jdormit-tf-state"
|
||||
key = "prod/justin-ghost-site.tfstate"
|
||||
}
|
||||
}
|
11
prod/justin-ghost-site/variables.tf
Normal file
11
prod/justin-ghost-site/variables.tf
Normal file
@ -0,0 +1,11 @@
|
||||
variable "do_token" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "spaces_access_id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "spaces_secret_key" {
|
||||
type = string
|
||||
}
|
13
prod/syncthing/main.tf
Normal file
13
prod/syncthing/main.tf
Normal file
@ -0,0 +1,13 @@
|
||||
provider "digitalocean" {
|
||||
token = var.do_token
|
||||
spaces_access_id = var.spaces_access_id
|
||||
spaces_secret_key = var.spaces_secret_key
|
||||
}
|
||||
|
||||
resource "digitalocean_droplet" "jdormit_syncthing" {
|
||||
name = "jdormit-syncthing"
|
||||
image = "53893572"
|
||||
region = "nyc1"
|
||||
size = "s-1vcpu-1gb"
|
||||
backups = true
|
||||
}
|
18
prod/syncthing/terraform.tf
Normal file
18
prod/syncthing/terraform.tf
Normal file
@ -0,0 +1,18 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
digitalocean = {
|
||||
source = "digitalocean/digitalocean"
|
||||
version = "~> 2.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
backend "s3" {
|
||||
skip_credentials_validation = true
|
||||
skip_metadata_api_check = true
|
||||
# Need to specify an AWS region to stop Terraform complaining
|
||||
region = "us-east-1"
|
||||
endpoint = "nyc3.digitaloceanspaces.com"
|
||||
bucket = "jdormit-tf-state"
|
||||
key = "prod/syncthing.tfstate"
|
||||
}
|
||||
}
|
11
prod/syncthing/variables.tf
Normal file
11
prod/syncthing/variables.tf
Normal file
@ -0,0 +1,11 @@
|
||||
variable "do_token" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "spaces_access_id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "spaces_secret_key" {
|
||||
type = string
|
||||
}
|
Loading…
Reference in New Issue
Block a user