diff --git a/provider/indexer-aws/CloudFormation/Automated/ecs.yml b/provider/indexer-aws/CloudFormation/Automated/ecs.yml index 6d7c64be144779147a3a89f75d39d269d31a134b..fc07108db1453591327093cda0a1a14552a90682 100644 --- a/provider/indexer-aws/CloudFormation/Automated/ecs.yml +++ b/provider/indexer-aws/CloudFormation/Automated/ecs.yml @@ -1,3 +1,17 @@ +# Copyright © Amazon Web Services +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + AWSTemplateFormatVersion: 2010-09-09 Description: >- CloudFormation template for creating the resources used for the ECS cluster the application will @@ -42,6 +56,11 @@ Parameters: Type: Number Default: '0' + MinSize: + Description: Maximum number of instances that can be launched in the ECS cluster. + Type: Number + Default: '0' + MaxSize: Description: Maximum number of instances that can be launched in the ECS cluster. Type: Number @@ -375,7 +394,7 @@ Resources: - Fn::ImportValue: !Sub "${Environment}-OSDU-PublicSubnet-AZ2" LaunchConfigurationName: !Ref 'ContainerInstances' - MinSize: '0' + MinSize: !Ref 'MinSize' MaxSize: !Ref 'MaxSize' DesiredCapacity: !Ref 'DesiredCapacity' CreationPolicy: diff --git a/provider/indexer-aws/CloudFormation/Master/os-indexer-master.yml b/provider/indexer-aws/CloudFormation/Master/os-indexer-master.yml index ba6404dd4324dd7fc21a2145ccc6e347db578282..a31923786f8859dc5ecb043e15f33bfccdccefb7 100644 --- a/provider/indexer-aws/CloudFormation/Master/os-indexer-master.yml +++ b/provider/indexer-aws/CloudFormation/Master/os-indexer-master.yml @@ -60,6 +60,11 @@ Parameters: Type: Number Default: '1' + MinSize: + Description: Maximum number of instances that can be launched in the ECS cluster. + Type: Number + Default: '0' + MaxSize: Description: Maximum number of instances that can be launched in the ECS cluster. Type: Number @@ -444,6 +449,7 @@ Resources: ApplicationName: !Ref ApplicationName KeyName: !Ref KeyName DesiredCapacity: !Ref DesiredCapacity + MinSize: !Ref MinSize MaxSize: !Ref MaxSize InstanceType: !Ref InstanceType diff --git a/provider/indexer-aws/CloudFormation/Params/dev.template_configuration.json b/provider/indexer-aws/CloudFormation/Params/dev.template_configuration.json index b776b90f966d058e4841a29a177304fc3191a00f..1af3a5c1600edb06e2fbc4397875b4cca6124bd4 100644 --- a/provider/indexer-aws/CloudFormation/Params/dev.template_configuration.json +++ b/provider/indexer-aws/CloudFormation/Params/dev.template_configuration.json @@ -6,6 +6,7 @@ "ApplicationName" : "os-indexer", "KeyName": "indexer-ecs-keypair", "DesiredCapacity": "0", + "MinSize": "0", "MaxSize": "3", "InstanceType": "t3.micro", "IndexerServiceIamUsername": "service-user-os-indexer", diff --git a/provider/indexer-aws/CloudFormation/Params/prod.template_configuration.json b/provider/indexer-aws/CloudFormation/Params/prod.template_configuration.json index a575872709107a10ed6ed3ab79f55c208df79fb9..ba07ff41e64880df5dfcf652bef92d8c552d144a 100644 --- a/provider/indexer-aws/CloudFormation/Params/prod.template_configuration.json +++ b/provider/indexer-aws/CloudFormation/Params/prod.template_configuration.json @@ -6,6 +6,7 @@ "ApplicationName" : "os-indexer", "KeyName": "indexer-ecs-keypair", "DesiredCapacity": "1", + "MinSize": "0", "MaxSize": "3", "InstanceType": "t3.micro", "IndexerServiceIamUsername": "service-user-os-indexer", diff --git a/provider/indexer-aws/CloudFormation/Params/uat.template_configuration.json b/provider/indexer-aws/CloudFormation/Params/uat.template_configuration.json index ec4b6e59a55c27b7d093d48d86ffbcc3455ec729..26fd295983725e67ff62da3cc148314aea497383 100644 --- a/provider/indexer-aws/CloudFormation/Params/uat.template_configuration.json +++ b/provider/indexer-aws/CloudFormation/Params/uat.template_configuration.json @@ -6,6 +6,7 @@ "ApplicationName" : "os-indexer", "KeyName": "indexer-ecs-keypair", "DesiredCapacity": "1", + "MinSize": "0", "MaxSize": "3", "InstanceType": "t3.micro", "IndexerServiceIamUsername": "service-user-os-indexer",