From 69b8ad8a509abe4111c720fc7ae10b25b088257a Mon Sep 17 00:00:00 2001 From: shockrah Date: Fri, 20 Oct 2023 15:03:05 -0700 Subject: [PATCH] Sec configuration with ssh keys --- infra/email-server/backend.tf | 37 + infra/email-server/docs/machine-types.json | 2786 ++++++++++++++++++++ infra/email-server/docs/os-list.json | 293 ++ infra/email-server/firewall.tf | 33 + infra/email-server/host.tf | 24 + infra/email-server/readme.md | 5 + infra/email-server/ssh.tf | 23 + infra/email-server/variables.tf | 32 + 8 files changed, 3233 insertions(+) create mode 100644 infra/email-server/backend.tf create mode 100644 infra/email-server/docs/machine-types.json create mode 100644 infra/email-server/docs/os-list.json create mode 100644 infra/email-server/firewall.tf create mode 100644 infra/email-server/host.tf create mode 100644 infra/email-server/readme.md create mode 100644 infra/email-server/ssh.tf create mode 100644 infra/email-server/variables.tf diff --git a/infra/email-server/backend.tf b/infra/email-server/backend.tf new file mode 100644 index 0000000..fd570dc --- /dev/null +++ b/infra/email-server/backend.tf @@ -0,0 +1,37 @@ +terraform { + required_version = ">= 0.13" + backend s3 { + bucket = "project-athens" + key = "infra/email-server/state/build.tfstate" + region = "us-west-1" + encrypt = true + } + required_providers { + vultr = { + source = "vultr/vultr" + version = "2.16.4" + } + aws = { + source = "hashicorp/aws" + version = "5.22.0" + } + tls = { + source = "hashicorp/tls" + version = "4.0.4" + } + } +} + +provider vultr { + api_key = var.vultr_api_key + rate_limit = 100 + retry_limit = 3 +} + +provider aws { + access_key = var.aws_key + secret_key = var.aws_secret + region = var.aws_region + max_retries = 1 +} + diff --git a/infra/email-server/docs/machine-types.json b/infra/email-server/docs/machine-types.json new file mode 100644 index 0000000..9a5955d --- /dev/null +++ b/infra/email-server/docs/machine-types.json @@ -0,0 +1,2786 @@ +{ + "plans": [ + { + "id": "vc2-1c-1gb", + "vcpu_count": 1, + "ram": 1024, + "disk": 25, + "disk_count": 1, + "bandwidth": 1024, + "monthly_cost": 5, + "type": "vc2", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vc2-1c-1gb-sc1", + "vcpu_count": 1, + "ram": 1024, + "disk": 25, + "disk_count": 1, + "bandwidth": 1024, + "monthly_cost": 7.5, + "type": "vc2", + "locations": [ + "sao" + ] + }, + { + "id": "vc2-1c-2gb", + "vcpu_count": 1, + "ram": 2048, + "disk": 55, + "disk_count": 1, + "bandwidth": 2048, + "monthly_cost": 10, + "type": "vc2", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vc2-1c-2gb-sc1", + "vcpu_count": 1, + "ram": 2048, + "disk": 55, + "disk_count": 1, + "bandwidth": 2048, + "monthly_cost": 15, + "type": "vc2", + "locations": [ + "sao" + ] + }, + { + "id": "vc2-2c-2gb", + "vcpu_count": 2, + "ram": 2048, + "disk": 65, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 15, + "type": "vc2", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "icn", + "mia", + "sgp", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vc2-2c-2gb-sc1", + "vcpu_count": 2, + "ram": 2048, + "disk": 65, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 22.5, + "type": "vc2", + "locations": [ + "sao" + ] + }, + { + "id": "vc2-2c-4gb", + "vcpu_count": 2, + "ram": 4096, + "disk": 80, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 20, + "type": "vc2", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vc2-2c-4gb-sc1", + "vcpu_count": 2, + "ram": 4096, + "disk": 80, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 30, + "type": "vc2", + "locations": [ + "sao" + ] + }, + { + "id": "vc2-4c-8gb", + "vcpu_count": 4, + "ram": 8192, + "disk": 160, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 40, + "type": "vc2", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vc2-4c-8gb-sc1", + "vcpu_count": 4, + "ram": 8192, + "disk": 160, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 60, + "type": "vc2", + "locations": [ + "sao" + ] + }, + { + "id": "vc2-6c-16gb", + "vcpu_count": 6, + "ram": 16384, + "disk": 320, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 80, + "type": "vc2", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vc2-6c-16gb-sc1", + "vcpu_count": 6, + "ram": 16384, + "disk": 320, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 120, + "type": "vc2", + "locations": [ + "sao" + ] + }, + { + "id": "vc2-8c-32gb", + "vcpu_count": 8, + "ram": 32768, + "disk": 640, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 160, + "type": "vc2", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vc2-8c-32gb-sc1", + "vcpu_count": 8, + "ram": 32768, + "disk": 640, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 240, + "type": "vc2", + "locations": [ + "sao" + ] + }, + { + "id": "vc2-16c-64gb", + "vcpu_count": 16, + "ram": 65536, + "disk": 1280, + "disk_count": 1, + "bandwidth": 10240, + "monthly_cost": 320, + "type": "vc2", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vc2-16c-64gb-sc1", + "vcpu_count": 16, + "ram": 65536, + "disk": 1280, + "disk_count": 1, + "bandwidth": 10240, + "monthly_cost": 480, + "type": "vc2", + "locations": [ + "sao" + ] + }, + { + "id": "vc2-24c-96gb", + "vcpu_count": 24, + "ram": 98304, + "disk": 1600, + "disk_count": 1, + "bandwidth": 15360, + "monthly_cost": 640, + "type": "vc2", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vc2-24c-96gb-sc1", + "vcpu_count": 24, + "ram": 98304, + "disk": 1600, + "disk_count": 1, + "bandwidth": 15360, + "monthly_cost": 960, + "type": "vc2", + "locations": [ + "sao" + ] + }, + { + "id": "vhf-1c-1gb", + "vcpu_count": 1, + "ram": 1024, + "disk": 32, + "disk_count": 1, + "bandwidth": 1024, + "monthly_cost": 6, + "type": "vhf", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhf-1c-1gb-sc1", + "vcpu_count": 1, + "ram": 1024, + "disk": 32, + "disk_count": 1, + "bandwidth": 1024, + "monthly_cost": 9, + "type": "vhf", + "locations": [ + "sao" + ] + }, + { + "id": "vhf-1c-2gb", + "vcpu_count": 1, + "ram": 2048, + "disk": 64, + "disk_count": 1, + "bandwidth": 2048, + "monthly_cost": 12, + "type": "vhf", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhf-1c-2gb-sc1", + "vcpu_count": 1, + "ram": 2048, + "disk": 64, + "disk_count": 1, + "bandwidth": 2048, + "monthly_cost": 18, + "type": "vhf", + "locations": [ + "sao" + ] + }, + { + "id": "vhf-2c-2gb", + "vcpu_count": 2, + "ram": 2048, + "disk": 80, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 18, + "type": "vhf", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhf-2c-2gb-sc1", + "vcpu_count": 2, + "ram": 2048, + "disk": 80, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 27, + "type": "vhf", + "locations": [ + "sao" + ] + }, + { + "id": "vhf-2c-4gb", + "vcpu_count": 2, + "ram": 4096, + "disk": 128, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 24, + "type": "vhf", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhf-2c-4gb-sc1", + "vcpu_count": 2, + "ram": 4096, + "disk": 128, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 36, + "type": "vhf", + "locations": [ + "sao" + ] + }, + { + "id": "vhf-3c-8gb", + "vcpu_count": 3, + "ram": 8192, + "disk": 256, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 48, + "type": "vhf", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhf-3c-8gb-sc1", + "vcpu_count": 3, + "ram": 8192, + "disk": 256, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 72, + "type": "vhf", + "locations": [ + "sao" + ] + }, + { + "id": "vhf-4c-16gb", + "vcpu_count": 4, + "ram": 16384, + "disk": 384, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 96, + "type": "vhf", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhf-4c-16gb-sc1", + "vcpu_count": 4, + "ram": 16384, + "disk": 384, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 144, + "type": "vhf", + "locations": [ + "sao" + ] + }, + { + "id": "vhf-6c-24gb", + "vcpu_count": 6, + "ram": 24576, + "disk": 448, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 144, + "type": "vhf", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhf-6c-24gb-sc1", + "vcpu_count": 6, + "ram": 24576, + "disk": 448, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 216, + "type": "vhf", + "locations": [ + "sao" + ] + }, + { + "id": "vhf-8c-32gb", + "vcpu_count": 8, + "ram": 32768, + "disk": 512, + "disk_count": 1, + "bandwidth": 7168, + "monthly_cost": 192, + "type": "vhf", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhf-8c-32gb-sc1", + "vcpu_count": 8, + "ram": 32768, + "disk": 512, + "disk_count": 1, + "bandwidth": 7168, + "monthly_cost": 288, + "type": "vhf", + "locations": [ + "sao" + ] + }, + { + "id": "vhf-12c-48gb", + "vcpu_count": 12, + "ram": 49152, + "disk": 768, + "disk_count": 1, + "bandwidth": 8192, + "monthly_cost": 256, + "type": "vhf", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhf-12c-48gb-sc1", + "vcpu_count": 12, + "ram": 49152, + "disk": 768, + "disk_count": 1, + "bandwidth": 8192, + "monthly_cost": 384, + "type": "vhf", + "locations": [ + "sao" + ] + }, + { + "id": "vhf-16c-58gb", + "vcpu_count": 16, + "ram": 59392, + "disk": 1024, + "disk_count": 1, + "bandwidth": 9216, + "monthly_cost": 320, + "type": "vhf", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhf-16c-58gb-sc1", + "vcpu_count": 16, + "ram": 59392, + "disk": 1024, + "disk_count": 1, + "bandwidth": 9216, + "monthly_cost": 480, + "type": "vhf", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-1c-1gb-amd", + "vcpu_count": 1, + "ram": 1024, + "disk": 25, + "disk_count": 1, + "bandwidth": 2048, + "monthly_cost": 6, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-1c-1gb-amd-sc1", + "vcpu_count": 1, + "ram": 1024, + "disk": 25, + "disk_count": 1, + "bandwidth": 2048, + "monthly_cost": 9, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-1c-2gb-amd", + "vcpu_count": 1, + "ram": 2048, + "disk": 50, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 12, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-1c-2gb-amd-sc1", + "vcpu_count": 1, + "ram": 2048, + "disk": 50, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 18, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-2c-2gb-amd", + "vcpu_count": 2, + "ram": 2048, + "disk": 60, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 18, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-2c-2gb-amd-sc1", + "vcpu_count": 2, + "ram": 2048, + "disk": 60, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 27, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-2c-4gb-amd", + "vcpu_count": 2, + "ram": 4096, + "disk": 100, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 24, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-2c-4gb-amd-sc1", + "vcpu_count": 2, + "ram": 4096, + "disk": 100, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 36, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-4c-8gb-amd", + "vcpu_count": 4, + "ram": 8192, + "disk": 180, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 48, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-4c-8gb-amd-sc1", + "vcpu_count": 4, + "ram": 8192, + "disk": 180, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 72, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-4c-12gb-amd", + "vcpu_count": 4, + "ram": 12288, + "disk": 260, + "disk_count": 1, + "bandwidth": 7168, + "monthly_cost": 72, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-4c-12gb-amd-sc1", + "vcpu_count": 4, + "ram": 12288, + "disk": 260, + "disk_count": 1, + "bandwidth": 7168, + "monthly_cost": 108, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-8c-16gb-amd", + "vcpu_count": 8, + "ram": 16384, + "disk": 350, + "disk_count": 1, + "bandwidth": 8192, + "monthly_cost": 96, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-8c-16gb-amd-sc1", + "vcpu_count": 8, + "ram": 16384, + "disk": 350, + "disk_count": 1, + "bandwidth": 8192, + "monthly_cost": 144, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-12c-24gb-amd", + "vcpu_count": 12, + "ram": 24576, + "disk": 500, + "disk_count": 1, + "bandwidth": 12288, + "monthly_cost": 144, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-12c-24gb-amd-sc1", + "vcpu_count": 12, + "ram": 24576, + "disk": 500, + "disk_count": 1, + "bandwidth": 12288, + "monthly_cost": 216, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-1c-1gb-intel", + "vcpu_count": 1, + "ram": 1024, + "disk": 25, + "disk_count": 1, + "bandwidth": 2048, + "monthly_cost": 6, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-1c-1gb-intel-sc1", + "vcpu_count": 1, + "ram": 1024, + "disk": 25, + "disk_count": 1, + "bandwidth": 2048, + "monthly_cost": 9, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-1c-2gb-intel", + "vcpu_count": 1, + "ram": 2048, + "disk": 50, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 12, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-1c-2gb-intel-sc1", + "vcpu_count": 1, + "ram": 2048, + "disk": 50, + "disk_count": 1, + "bandwidth": 3072, + "monthly_cost": 18, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-2c-2gb-intel", + "vcpu_count": 2, + "ram": 2048, + "disk": 60, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 18, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-2c-2gb-intel-sc1", + "vcpu_count": 2, + "ram": 2048, + "disk": 60, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 27, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-2c-4gb-intel", + "vcpu_count": 2, + "ram": 4096, + "disk": 100, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 24, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-2c-4gb-intel-sc1", + "vcpu_count": 2, + "ram": 4096, + "disk": 100, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 36, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-4c-8gb-intel", + "vcpu_count": 4, + "ram": 8192, + "disk": 180, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 48, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-4c-8gb-intel-sc1", + "vcpu_count": 4, + "ram": 8192, + "disk": 180, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 72, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-4c-12gb-intel", + "vcpu_count": 4, + "ram": 12288, + "disk": 260, + "disk_count": 1, + "bandwidth": 7168, + "monthly_cost": 72, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-4c-12gb-intel-sc1", + "vcpu_count": 4, + "ram": 12288, + "disk": 260, + "disk_count": 1, + "bandwidth": 7168, + "monthly_cost": 108, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-8c-16gb-intel", + "vcpu_count": 8, + "ram": 16384, + "disk": 350, + "disk_count": 1, + "bandwidth": 8192, + "monthly_cost": 96, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-8c-16gb-intel-sc1", + "vcpu_count": 8, + "ram": 16384, + "disk": 350, + "disk_count": 1, + "bandwidth": 8192, + "monthly_cost": 144, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "vhp-12c-24gb-intel", + "vcpu_count": 12, + "ram": 24576, + "disk": 500, + "disk_count": 1, + "bandwidth": 12288, + "monthly_cost": 144, + "type": "vhp", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "vhp-12c-24gb-intel-sc1", + "vcpu_count": 12, + "ram": 24576, + "disk": 500, + "disk_count": 1, + "bandwidth": 12288, + "monthly_cost": 216, + "type": "vhp", + "locations": [ + "sao" + ] + }, + { + "id": "voc-c-1c-2gb-25s-amd", + "vcpu_count": 1, + "ram": 2048, + "disk": 25, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 28, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-c-1c-2gb-25s-amd-sc1", + "vcpu_count": 1, + "ram": 2048, + "disk": 25, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 42, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-g-1c-4gb-30s-amd", + "vcpu_count": 1, + "ram": 4096, + "disk": 30, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 30, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-g-1c-4gb-30s-amd-sc1", + "vcpu_count": 1, + "ram": 4096, + "disk": 30, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 45, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-m-1c-8gb-50s-amd", + "vcpu_count": 1, + "ram": 8192, + "disk": 50, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 40, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-m-1c-8gb-50s-amd-sc1", + "vcpu_count": 1, + "ram": 8192, + "disk": 50, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 60, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-c-2c-4gb-50s-amd", + "vcpu_count": 2, + "ram": 4096, + "disk": 50, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 40, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-g-2c-8gb-50s-amd", + "vcpu_count": 2, + "ram": 8192, + "disk": 50, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 60, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-c-2c-4gb-50s-amd-sc1", + "vcpu_count": 2, + "ram": 4096, + "disk": 50, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 60, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-g-2c-8gb-50s-amd-sc1", + "vcpu_count": 2, + "ram": 8192, + "disk": 50, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 90, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-c-2c-4gb-75s-amd", + "vcpu_count": 2, + "ram": 4096, + "disk": 75, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 45, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-c-2c-4gb-75s-amd-sc1", + "vcpu_count": 2, + "ram": 4096, + "disk": 75, + "disk_count": 1, + "bandwidth": 5120, + "monthly_cost": 67.5, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-c-4c-8gb-75s-amd", + "vcpu_count": 4, + "ram": 8192, + "disk": 75, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 80, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-c-4c-8gb-75s-amd-sc1", + "vcpu_count": 4, + "ram": 8192, + "disk": 75, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 120, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-g-4c-16gb-80s-amd", + "vcpu_count": 4, + "ram": 16384, + "disk": 80, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 120, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-g-4c-16gb-80s-amd-sc1", + "vcpu_count": 4, + "ram": 16384, + "disk": 80, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 180, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-m-2c-16gb-100s-amd", + "vcpu_count": 2, + "ram": 16384, + "disk": 100, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 80, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-m-2c-16gb-100s-amd-sc1", + "vcpu_count": 2, + "ram": 16384, + "disk": 100, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 120, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-s-1c-8gb-150s-amd", + "vcpu_count": 1, + "ram": 8192, + "disk": 150, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 75, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-s-1c-8gb-150s-amd-sc1", + "vcpu_count": 1, + "ram": 8192, + "disk": 150, + "disk_count": 1, + "bandwidth": 4096, + "monthly_cost": 112.5, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-c-4c-8gb-150s-amd", + "vcpu_count": 4, + "ram": 8192, + "disk": 150, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 90, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-c-4c-8gb-150s-amd-sc1", + "vcpu_count": 4, + "ram": 8192, + "disk": 150, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 135, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-c-8c-16gb-150s-amd", + "vcpu_count": 8, + "ram": 16384, + "disk": 150, + "disk_count": 1, + "bandwidth": 7168, + "monthly_cost": 160, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-c-8c-16gb-150s-amd-sc1", + "vcpu_count": 8, + "ram": 16384, + "disk": 150, + "disk_count": 1, + "bandwidth": 7168, + "monthly_cost": 240, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-g-8c-32gb-160s-amd", + "vcpu_count": 8, + "ram": 32768, + "disk": 160, + "disk_count": 1, + "bandwidth": 7168, + "monthly_cost": 240, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-g-8c-32gb-160s-amd-sc1", + "vcpu_count": 8, + "ram": 32768, + "disk": 160, + "disk_count": 1, + "bandwidth": 7168, + "monthly_cost": 360, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-m-2c-16gb-200s-amd", + "vcpu_count": 2, + "ram": 16384, + "disk": 200, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 100, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-m-2c-16gb-200s-amd-sc1", + "vcpu_count": 2, + "ram": 16384, + "disk": 200, + "disk_count": 1, + "bandwidth": 6144, + "monthly_cost": 150, + "type": "voc", + "locations": [ + "sao" + ] + }, + { + "id": "voc-m-4c-32gb-200s-amd", + "vcpu_count": 4, + "ram": 32768, + "disk": 200, + "disk_count": 1, + "bandwidth": 8192, + "monthly_cost": 160, + "type": "voc", + "locations": [ + "ewr", + "ord", + "dfw", + "sea", + "lax", + "atl", + "ams", + "lhr", + "fra", + "sjc", + "syd", + "yto", + "cdg", + "nrt", + "waw", + "mad", + "icn", + "mia", + "sgp", + "sto", + "mex", + "mel", + "hnl", + "bom", + "jnb", + "tlv", + "blr", + "del", + "scl", + "itm", + "man" + ] + }, + { + "id": "voc-m-4c-32gb-200s-amd-sc1", + "vcpu_count": 4, + "ram": 32768, + "disk": 200, + "disk_count": 1, + "bandwidth": 8192, + "monthly_cost": 240, + "type": "voc", + "locations": [ + "sao" + ] + } + ], + "meta": { + "total": 199, + "links": { + "next": "bmV4dF9fdm9jLW0tNGMtMzJnYi0yMDBzLWFtZC1zYzE=", + "prev": "" + } + } +} diff --git a/infra/email-server/docs/os-list.json b/infra/email-server/docs/os-list.json new file mode 100644 index 0000000..a763bd3 --- /dev/null +++ b/infra/email-server/docs/os-list.json @@ -0,0 +1,293 @@ +{ + "os": [ + { + "id": 124, + "name": "Windows 2012 R2 Standard x64", + "arch": "x64", + "family": "windows" + }, + { + "id": 159, + "name": "Custom", + "arch": "x64", + "family": "iso" + }, + { + "id": 164, + "name": "Snapshot", + "arch": "x64", + "family": "snapshot" + }, + { + "id": 167, + "name": "CentOS 7 x64", + "arch": "x64", + "family": "centos" + }, + { + "id": 180, + "name": "Backup", + "arch": "x64", + "family": "backup" + }, + { + "id": 186, + "name": "Application", + "arch": "x64", + "family": "application" + }, + { + "id": 240, + "name": "Windows 2016 Standard x64", + "arch": "x64", + "family": "windows" + }, + { + "id": 327, + "name": "FreeBSD 12 x64", + "arch": "x64", + "family": "freebsd" + }, + { + "id": 352, + "name": "Debian 10 x64 (buster)", + "arch": "x64", + "family": "debian" + }, + { + "id": 371, + "name": "Windows 2019 Standard x64", + "arch": "x64", + "family": "windows" + }, + { + "id": 381, + "name": "CentOS 7 SELinux x64", + "arch": "x64", + "family": "centos" + }, + { + "id": 387, + "name": "Ubuntu 20.04 LTS x64", + "arch": "x64", + "family": "ubuntu" + }, + { + "id": 391, + "name": "Fedora CoreOS Stable", + "arch": "x64", + "family": "fedora-coreos" + }, + { + "id": 401, + "name": "CentOS 8 Stream x64", + "arch": "x64", + "family": "centos" + }, + { + "id": 424, + "name": "Fedora CoreOS Next", + "arch": "x64", + "family": "fedora-coreos" + }, + { + "id": 425, + "name": "Fedora CoreOS Testing", + "arch": "x64", + "family": "fedora-coreos" + }, + { + "id": 447, + "name": "FreeBSD 13 x64", + "arch": "x64", + "family": "freebsd" + }, + { + "id": 448, + "name": "Rocky Linux x64", + "arch": "x64", + "family": "rockylinux" + }, + { + "id": 452, + "name": "AlmaLinux x64", + "arch": "x64", + "family": "almalinux" + }, + { + "id": 477, + "name": "Debian 11 x64 (bullseye)", + "arch": "x64", + "family": "debian" + }, + { + "id": 501, + "name": "Windows 2022 Standard x64", + "arch": "x64", + "family": "windows" + }, + { + "id": 521, + "name": "Windows Core 2022 Standard x64", + "arch": "x64", + "family": "windows" + }, + { + "id": 522, + "name": "Windows Core 2016 Standard x64", + "arch": "x64", + "family": "windows" + }, + { + "id": 523, + "name": "Windows Core 2019 Standard x64", + "arch": "x64", + "family": "windows" + }, + { + "id": 535, + "name": "Arch Linux x64", + "arch": "x64", + "family": "archlinux" + }, + { + "id": 542, + "name": "CentOS 9 Stream x64", + "arch": "x64", + "family": "centos" + }, + { + "id": 1743, + "name": "Ubuntu 22.04 LTS x64", + "arch": "x64", + "family": "ubuntu" + }, + { + "id": 1761, + "name": "Windows Core 2019 Datacenter x64", + "arch": "x64", + "family": "windows" + }, + { + "id": 1762, + "name": "Windows Core 2022 Datacenter x64", + "arch": "x64", + "family": "windows" + }, + { + "id": 1764, + "name": "Windows 2019 Datacenter x64", + "arch": "x64", + "family": "windows" + }, + { + "id": 1765, + "name": "Windows 2022 Datacenter x64", + "arch": "x64", + "family": "windows" + }, + { + "id": 1868, + "name": "AlmaLinux 9 x64", + "arch": "x64", + "family": "almalinux" + }, + { + "id": 1869, + "name": "Rocky Linux 9 x64", + "arch": "x64", + "family": "rockylinux" + }, + { + "id": 1929, + "name": "Fedora 37 x64", + "arch": "x64", + "family": "fedora" + }, + { + "id": 2075, + "name": "Flatcar Container Linux LTS x64", + "arch": "x64", + "family": "flatcar" + }, + { + "id": 2076, + "name": "Alpine Linux x64", + "arch": "x64", + "family": "alpinelinux" + }, + { + "id": 2077, + "name": "Flatcar Container Linux Stable x64", + "arch": "x64", + "family": "flatcar" + }, + { + "id": 2078, + "name": "Flatcar Container Linux Beta x64", + "arch": "x64", + "family": "flatcar" + }, + { + "id": 2079, + "name": "Flatcar Container Linux Alpha x64", + "arch": "x64", + "family": "flatcar" + }, + { + "id": 2104, + "name": "Ubuntu 23.04 x64", + "arch": "x64", + "family": "ubuntu" + }, + { + "id": 2105, + "name": "OpenBSD 7.3 x64", + "arch": "x64", + "family": "openbsd" + }, + { + "id": 2107, + "name": "Fedora 38 x64", + "arch": "x64", + "family": "fedora" + }, + { + "id": 2136, + "name": "Debian 12 x64 (bookworm)", + "arch": "x64", + "family": "debian" + }, + { + "id": 2171, + "name": "Vultr GPU Stack Ubuntu 20.04", + "arch": "x64", + "family": "vultr_gpu_stack" + }, + { + "id": 2172, + "name": "Vultr GPU Stack Ubuntu 22.04", + "arch": "x64", + "family": "vultr_gpu_stack" + }, + { + "id": 2179, + "name": "Ubuntu 23.10 x64", + "arch": "x64", + "family": "ubuntu" + }, + { + "id": 2187, + "name": "OpenBSD 7.4 x64", + "arch": "x64", + "family": "openbsd" + } + ], + "meta": { + "total": 47, + "links": { + "next": "", + "prev": "" + } + } +} diff --git a/infra/email-server/firewall.tf b/infra/email-server/firewall.tf new file mode 100644 index 0000000..11896ca --- /dev/null +++ b/infra/email-server/firewall.tf @@ -0,0 +1,33 @@ +locals { + rules = { + # https://github.com/mail-in-a-box/mailinabox/blob/main/security.md + tcp = [22, 25, 53, 80, 443, 465, 587, 993, 995] + udp = [53] + } +} +resource vultr_firewall_group mail { + description = "Mail server main firewall" +} + +# Inbound rules that we need to define for the instance +# Create all the tcp rules of type ipv4 +resource vultr_firewall_rule mail_tcp { + for_each = toset([for v in local.rules.tcp: tostring(v)]) + firewall_group_id = vultr_instance.mail.id + protocol = "tcp" + ip_type = "v4" + subnet = "0.0.0.0" + subnet_size = 0 + port = each.value +} + +# Create all the udp rules of type ipv4 +resource vultr_firewall_rule mail_udp { + for_each = toset([for v in local.rules.udp: tostring(v)]) + firewall_group_id = vultr_instance.mail.id + protocol = "udp" + ip_type = "v4" + subnet = "0.0.0.0" + subnet_size = 0 + port = each.value +} diff --git a/infra/email-server/host.tf b/infra/email-server/host.tf new file mode 100644 index 0000000..cff7a42 --- /dev/null +++ b/infra/email-server/host.tf @@ -0,0 +1,24 @@ +# Basic configuration for the mail server itself +# Monthly cost for this should be about 10$ a month +resource vultr_instance mail { + # Core config + plan = var.mail.plan + region = var.mail.region + os_id = var.mail.os + # + # Enable backups of the server in case we lose something for some reason + backups = "enabled" + backups_schedule { + type = "daily_alt_even" + } + + # Metadata + hostname = var.mail.name + label = var.mail.name + tags = [ + "Mail server", + var.mail.name, + ] +} + + diff --git a/infra/email-server/readme.md b/infra/email-server/readme.md new file mode 100644 index 0000000..4ee2671 --- /dev/null +++ b/infra/email-server/readme.md @@ -0,0 +1,5 @@ +# Email server + + + + diff --git a/infra/email-server/ssh.tf b/infra/email-server/ssh.tf new file mode 100644 index 0000000..d678b19 --- /dev/null +++ b/infra/email-server/ssh.tf @@ -0,0 +1,23 @@ +resource tls_private_key mail { + algorithm = "RSA" + rsa_bits = 4096 +} + +# Ensure we can access the keys when we require it +resource local_sensitive_file mail_private_key { + filename = "${path.module}/mail_pem" + content = tls_private_key.mail.private_key_pem + file_permission = "0600" +} + +resource local_sensitive_file mail_public_key { + filename = "${path.module}/mail_pub" + content = tls_private_key.mail.public_key_openssh + file_permission = "0600" +} + +resource vultr_ssh_key mail { + name = mail_key + ssh_key = tls_private_key.mail.public_key_openssh +} + diff --git a/infra/email-server/variables.tf b/infra/email-server/variables.tf new file mode 100644 index 0000000..b216c51 --- /dev/null +++ b/infra/email-server/variables.tf @@ -0,0 +1,32 @@ +# Provider variables +#################### + +variable vultr_api_key { + type = string + sensitive = true +} + +variable aws_key { + type = string + sensitive = true +} + +variable aws_secret { + type = string + sensitive = true +} + +variable aws_region { + type = string + default = "us-west-1" +} + +variable mail { + type = object({ + plan = string + region = string + os = number + name = string + }) +} +