Removing unused infra structure, lowering cost with this commit
This commit is contained in:
parent
8f375def3b
commit
550cb2eb70
@ -1,34 +0,0 @@
|
|||||||
# NOTE: this will no longer be used and is getting removed once we seutp the
|
|
||||||
# new alpha cluster correctly
|
|
||||||
|
|
||||||
# This is the continuation of the old alpha host but with much cleaner code
|
|
||||||
# and less manual infra setup involved. Key differences are that block storage
|
|
||||||
# is now completely kept in this module instead of yolo'd out like before.
|
|
||||||
|
|
||||||
######################### SSH KEY ##############################################
|
|
||||||
resource "aws_key_pair" "atlas_ssh" {
|
|
||||||
key_name = var.atlas_ssh_key_name
|
|
||||||
public_key = file(var.atlas_public_key_path)
|
|
||||||
}
|
|
||||||
|
|
||||||
######################### files.leftcoast.space VOLUME #########################
|
|
||||||
resource "aws_ebs_volume" "files-leftcoast-space" {
|
|
||||||
availability_zone = var.athens_availability_zone
|
|
||||||
size = 30
|
|
||||||
|
|
||||||
tags = {
|
|
||||||
Name = "files.leftcoast.space-ebs"
|
|
||||||
Description = "Volume is to be used entirely for Photos/Video"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
######################### clips.shockrah.xyz VOLUME ############################
|
|
||||||
resource "aws_ebs_volume" "clips-shockrah-xyz" {
|
|
||||||
availability_zone = var.athens_availability_zone
|
|
||||||
size = 30
|
|
||||||
|
|
||||||
tags = {
|
|
||||||
Name = "clips.shockrah.xyz-ebs"
|
|
||||||
Description = "Used for the clippable instance"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
# This module defines the beta server instance which
|
|
||||||
|
|
||||||
resource "aws_key_pair" "beta_ssh" {
|
|
||||||
key_name = var.beta_public_key_path
|
|
||||||
public_key = file(var.beta_public_key_path)
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "aws_instance" "beta" {
|
|
||||||
ami = var.beta_ami_id
|
|
||||||
instance_type = var.beta_instance_type
|
|
||||||
|
|
||||||
key_name = var.beta_public_key_path
|
|
||||||
|
|
||||||
private_ip = "10.0.1.11"
|
|
||||||
vpc_security_group_ids = [
|
|
||||||
aws_security_group.general_web_req.id,
|
|
||||||
aws_security_group.remote_ssh_rec.id
|
|
||||||
]
|
|
||||||
|
|
||||||
subnet_id = aws_subnet.crete_subnet.id
|
|
||||||
|
|
||||||
tags = {
|
|
||||||
Name = "Beta Host"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
resource "aws_eip" "beta_eip" {
|
|
||||||
vpc = true
|
|
||||||
instance = aws_instance.beta.id
|
|
||||||
tags = {
|
|
||||||
Name = "Beta EIP"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -20,74 +20,6 @@ variable "aws_region" {
|
|||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
######################### Alpha variables
|
|
||||||
|
|
||||||
variable "alpha_ssh_key_name" {
|
|
||||||
description = "Alpha ssh keyname"
|
|
||||||
type = string
|
|
||||||
sensitive = true
|
|
||||||
}
|
|
||||||
variable "alpha_public_key_path" {
|
|
||||||
description = "Alpha's path t key on local disk"
|
|
||||||
type = string
|
|
||||||
sensitive = true
|
|
||||||
}
|
|
||||||
variable "alpha_instance_type" {
|
|
||||||
description = "Alpha instance type(larger than beta due to docker requirement"
|
|
||||||
type = string
|
|
||||||
sensitive = true
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "alpha_ami_id" {
|
|
||||||
description = "AMI type for the docker host"
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
######################### Alpha variables ######################################
|
|
||||||
|
|
||||||
variable "atlas_ssh_key_name" {
|
|
||||||
description = "Atlas ssh keyname"
|
|
||||||
type = string
|
|
||||||
sensitive = true
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "atlas_public_key_path" {
|
|
||||||
description = "Atlas' key filepath on local disk"
|
|
||||||
type = string
|
|
||||||
sensitive = true
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "atlas_instance_type" {
|
|
||||||
description = "Atlas instance type larger size for docker"
|
|
||||||
type = string
|
|
||||||
sensitive = true
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "atlas_ami_id" {
|
|
||||||
description = "AMI type for the docker host"
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
######################### Beta variables
|
|
||||||
variable "beta_ssh_key_name" {
|
|
||||||
description = "SSH Key name for static web host"
|
|
||||||
type = string
|
|
||||||
sensitive = true
|
|
||||||
}
|
|
||||||
variable "beta_public_key_path" {
|
|
||||||
description = "Pub key path on disk"
|
|
||||||
type = string
|
|
||||||
sensitive = true
|
|
||||||
}
|
|
||||||
variable "beta_instance_type" {
|
|
||||||
description = "Host machine type"
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
variable "beta_ami_id" {
|
|
||||||
description = "AMI type for the static web host"
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
######################### Subnet variables
|
######################### Subnet variables
|
||||||
variable "crete_cidr" {
|
variable "crete_cidr" {
|
||||||
description = "CIDR block for the servers themselves"
|
description = "CIDR block for the servers themselves"
|
||||||
|
@ -36,8 +36,6 @@ locals {
|
|||||||
},
|
},
|
||||||
{ name = "www.shockrah.xyz", records = [ aws_lb.alpha.dns_name ] },
|
{ name = "www.shockrah.xyz", records = [ aws_lb.alpha.dns_name ] },
|
||||||
{ name = "resume.shockrah.xyz", records = [ aws_lb.alpha.dns_name ] }
|
{ name = "resume.shockrah.xyz", records = [ aws_lb.alpha.dns_name ] }
|
||||||
# NOTE: This one requires a proper rebuild to function
|
|
||||||
#{ name = "freechat.shockrah.xyz", records = [ aws_eip.beta_eip.public_ip ] },
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,14 +88,3 @@ resource "aws_security_group" "general_web_req" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_security_group" "remote_ssh_rec" {
|
|
||||||
name = "Athens Internal SSH RECV"
|
|
||||||
vpc_id = aws_vpc.athens_vpc.id
|
|
||||||
ingress {
|
|
||||||
cidr_blocks = ["0.0.0.0/0"]
|
|
||||||
from_port = 22
|
|
||||||
to_port = 22
|
|
||||||
protocol = "tcp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user