diff --git a/infra/alpha.tf b/infra/alpha.tf index d2d02da..3c0f1a6 100644 --- a/infra/alpha.tf +++ b/infra/alpha.tf @@ -6,6 +6,25 @@ resource "aws_key_pair" "alpha_ssh" { public_key = file(var.alpha_public_key_path) } +resource "aws_ebs_volume" "photo_gallery_volume" { + availability_zone = var.athens_availability_zone + size = 35 + + tags = { + Name = "Photo gallery volume" + Description = "Volume is to be used entirely for Photos/Video" + } +} + +resource "aws_ebs_volume" "id" { + availability_zone = "us-west-1b" + size = 35 + tags = { + Name = "Clips" + Description = "Used for the clippable instance" + } +} + resource "aws_instance" "alpha" { ami = var.alpha_ami_id instance_type = var.alpha_instance_type @@ -13,7 +32,7 @@ resource "aws_instance" "alpha" { key_name = var.alpha_ssh_key_name private_ip = "10.0.1.10" - security_groups = [ + vpc_security_group_ids = [ aws_security_group.general_web_req.id, aws_security_group.remote_ssh_rec.id ] @@ -22,4 +41,12 @@ resource "aws_instance" "alpha" { Name = "Alpha Host" Description = "Docker host with chatbots mostly" } + +} + +resource "aws_volume_attachment" "photo_gallery_attach" { + # hdp is for hard drive photos in this case + device_name = "/dev/sdp" + volume_id = aws_ebs_volume.photo_gallery_volume.id + instance_id = aws_instance.alpha.id } diff --git a/infra/beta.tf b/infra/beta.tf index a8824e4..3f4ee31 100644 --- a/infra/beta.tf +++ b/infra/beta.tf @@ -12,7 +12,7 @@ resource "aws_instance" "beta" { key_name = var.beta_public_key_path private_ip = "10.0.1.11" - security_groups = [ + vpc_security_group_ids = [ aws_security_group.general_web_req.id, aws_security_group.remote_ssh_rec.id ]