From 5bd7a7562b847caccc7e1c903db4edc082861459 Mon Sep 17 00:00:00 2001 From: Greg Hendrickson Date: Fri, 17 Nov 2023 14:02:43 -0800 Subject: [PATCH] remove efs elb --- aws/aws_simple/main.tf | 16 ------- aws/aws_simple/modules/efs/main.tf | 60 ------------------------- aws/aws_simple/modules/efs/outputs.tf | 0 aws/aws_simple/modules/efs/variables.tf | 31 ------------- aws/aws_simple/modules/elb/main.tf | 0 5 files changed, 107 deletions(-) delete mode 100644 aws/aws_simple/modules/efs/main.tf delete mode 100644 aws/aws_simple/modules/efs/outputs.tf delete mode 100644 aws/aws_simple/modules/efs/variables.tf delete mode 100644 aws/aws_simple/modules/elb/main.tf diff --git a/aws/aws_simple/main.tf b/aws/aws_simple/main.tf index dd174f2..55a75f9 100644 --- a/aws/aws_simple/main.tf +++ b/aws/aws_simple/main.tf @@ -62,19 +62,3 @@ module "ec2-west" { vpc_id_west_2 = module.vpc-west.vpc_id_west_2 } - -module "elb" { - source = "./modules/elb" -} - -module "efs" { - source = "./modules/efs" - - us_east_subnet_1_id = module.subnets_us_east.us_east_subnet_1_id - us_east_subnet_2_id = module.subnets_us_east.us_east_subnet_2_id - us_east_subnet_3_id = module.subnets_us_east.us_east_subnet_3_id - us_west_subnet_1_id = module.subnets_us_west.us_west_subnet_1_id - us_west_subnet_2_id = module.subnets_us_west.us_west_subnet_2_id - us_west_subnet_3_id = module.subnets_us_west.us_west_subnet_3_id - -} diff --git a/aws/aws_simple/modules/efs/main.tf b/aws/aws_simple/modules/efs/main.tf deleted file mode 100644 index 951a747..0000000 --- a/aws/aws_simple/modules/efs/main.tf +++ /dev/null @@ -1,60 +0,0 @@ -resource "aws_efs_file_system" "efs" { - creation_token = "efs-asg-west-east" - encrypted = true - performance_mode = "generalPurpose" - throughput_mode = "bursting" -} - - - -resource "aws_efs_mount_target" "us_west_subnet_1" { - file_system_id = aws_efs_file_system.efs.id - subnet_id = var.us_west_subnet_1_id - depends_on = [var.us_west_subnet_1_id] -} - -resource "aws_efs_mount_target" "us_west_subnet_2" { - file_system_id = aws_efs_file_system.efs.id - subnet_id = var.us_west_subnet_2_id - depends_on = [var.us_west_subnet_2_id] -} - -resource "aws_efs_mount_target" "us_west_subnet_3" { - file_system_id = aws_efs_file_system.efs.id - subnet_id = var.us_west_subnet_3_id - depends_on = [var.us_west_subnet_3_id] -} - -data "template_file" "mount_script" { - template = <> /etc/fstab -mount -a -t efs,nfs4 defaults -EOF -} - -provider "aws" { - region = "us-east-1" - - -} - -resource "aws_efs_mount_target" "us_east_subnet_1" { - file_system_id = aws_efs_file_system.efs.id - subnet_id = var.us_east_subnet_1_id - depends_on = [var.us_east_subnet_1_id] -} - -resource "aws_efs_mount_target" "us_east_subnet_2" { - file_system_id = aws_efs_file_system.efs.id - subnet_id = var.us_east_subnet_2_id - depends_on = [var.us_east_subnet_2_id] -} - -resource "aws_efs_mount_target" "us_east_subnet_3" { - file_system_id = aws_efs_file_system.efs.id - subnet_id = var.us_east_subnet_3_id - depends_on = [var.us_east_subnet_3_id] -} \ No newline at end of file diff --git a/aws/aws_simple/modules/efs/outputs.tf b/aws/aws_simple/modules/efs/outputs.tf deleted file mode 100644 index e69de29..0000000 diff --git a/aws/aws_simple/modules/efs/variables.tf b/aws/aws_simple/modules/efs/variables.tf deleted file mode 100644 index ad01200..0000000 --- a/aws/aws_simple/modules/efs/variables.tf +++ /dev/null @@ -1,31 +0,0 @@ -variable "us_east_subnet_1_id" { - description = "The ID of the first US East subnet" - type = string -} - -variable "us_east_subnet_2_id" { - description = "The ID of the second US East subnet" - type = string -} - -variable "us_east_subnet_3_id" { - description = "The ID of the third US East subnet" - type = string -} - -variable "us_west_subnet_1_id" { - description = "The ID of the first US East subnet" - type = string -} - -variable "us_west_subnet_2_id" { - description = "The ID of the second US East subnet" - type = string -} - -variable "us_west_subnet_3_id" { - description = "The ID of the third US East subnet" - type = string -} - - \ No newline at end of file diff --git a/aws/aws_simple/modules/elb/main.tf b/aws/aws_simple/modules/elb/main.tf deleted file mode 100644 index e69de29..0000000