From c746e3c0da16eca0989183d9393860a50debcd37 Mon Sep 17 00:00:00 2001 From: "Victor.Bi" Date: Thu, 1 Apr 2021 14:58:12 +1300 Subject: [PATCH] single root drive 30 change, remove secondary drive --- api/backend/ecs/environment_manager.go | 3 +-- api/backend/ecs/environment_manager_test.go | 2 +- setup/module/api/environment.tf | 6 ------ 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/api/backend/ecs/environment_manager.go b/api/backend/ecs/environment_manager.go index c32b5f6e0..7e5b1a01c 100644 --- a/api/backend/ecs/environment_manager.go +++ b/api/backend/ecs/environment_manager.go @@ -203,8 +203,7 @@ func (e *ECSEnvironmentManager) CreateEnvironment( launchConfigurationName := ecsEnvironmentID.LaunchConfigurationName() volSizes := make(map[string]int) if operatingSystem == "linux" { - volSizes["/dev/xvda"] = 30; - volSizes["/dev/xvdcz"] = 22; + volSizes["/dev/xvda"] = 30; } else { volSizes["/dev/sda1"] = 200 } diff --git a/api/backend/ecs/environment_manager_test.go b/api/backend/ecs/environment_manager_test.go index 815919fbd..7a15ee989 100644 --- a/api/backend/ecs/environment_manager_test.go +++ b/api/backend/ecs/environment_manager_test.go @@ -381,7 +381,7 @@ func TestCreateEnvironment(t *testing.T) { reporter.AssertEqualf("m3.medium", *instanceType, "Instance Type") reporter.AssertEqualf(config.TEST_AWS_KEY_PAIR, *keyName, "KeyPair") reporter.AssertEqualf(securityGroupID, *securityGroups[0], "SecurityGroupID 0") - reporter.AssertEqualf(volSizes, map[string]int{"/dev/xvda": 30,"/dev/xvdcz": 22}, "Volume Sizes") + reporter.AssertEqualf(volSizes, map[string]int{"/dev/xvda": 30}, "Volume Sizes") return nil } diff --git a/setup/module/api/environment.tf b/setup/module/api/environment.tf index 39e1b1740..0cd4ad196 100644 --- a/setup/module/api/environment.tf +++ b/setup/module/api/environment.tf @@ -47,12 +47,6 @@ resource "aws_launch_configuration" "api" { volume_type = "gp2" volume_size = "30" } - ebs_block_device { - delete_on_termination = true - device_name ="/dev/xvdcz" - volume_type = "gp2" - volume_size = "22" - } lifecycle { create_before_destroy = true