Skip to content

Commit 06d96c3

Browse files
yanpYan Pan
andauthored
Add cpu and memory to variables (#32)
Co-authored-by: Yan Pan <[email protected]>
1 parent 0ea3a39 commit 06d96c3

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

modules/metadata-service/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ If the `access_list_cidr_blocks` variable is set, only traffic originating from
2424
| <a name="input_iam_partition"></a> [iam\_partition](#input\_iam\_partition) | IAM Partition (Select aws-us-gov for AWS GovCloud, otherwise leave as is) | `string` | `"aws"` | no |
2525
| <a name="input_is_gov"></a> [is\_gov](#input\_is\_gov) | Set to true if IAM partition is 'aws-us-gov' | `bool` | `false` | no |
2626
| <a name="input_metadata_service_container_image"></a> [metadata\_service\_container\_image](#input\_metadata\_service\_container\_image) | Container image for metadata service | `string` | `""` | no |
27+
| <a name="input_metadata_service_cpu"></a> [metadata\_service\_cpu](#input\_metadata\_service\_cpu) | ECS task CPU unit for metadata service | `number` | `512` | no |
28+
| <a name="input_metadata_service_memory"></a> [metadata\_service\_memory](#input\_metadata\_service\_memory) | ECS task memory in MiB for metadata service | `number` | `1024` | no |
2729
| <a name="input_metaflow_vpc_id"></a> [metaflow\_vpc\_id](#input\_metaflow\_vpc\_id) | ID of the Metaflow VPC this SageMaker notebook instance is to be deployed in | `string` | n/a | yes |
2830
| <a name="input_rds_master_instance_endpoint"></a> [rds\_master\_instance\_endpoint](#input\_rds\_master\_instance\_endpoint) | The database connection endpoint in address:port format | `string` | n/a | yes |
2931
| <a name="input_resource_prefix"></a> [resource\_prefix](#input\_resource\_prefix) | Prefix given to all AWS resources to differentiate between applications | `string` | n/a | yes |

modules/metadata-service/ecs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ resource "aws_ecs_task_definition" "this" {
1919
"name": "${var.resource_prefix}service${var.resource_suffix}",
2020
"image": "${var.metadata_service_container_image}",
2121
"essential": true,
22-
"cpu": 512,
23-
"memory": 1024,
22+
"cpu": var.metadata_service_cpu,
23+
"memory": var.metadata_service_memory,
2424
"portMappings": [
2525
{
2626
"containerPort": 8080,

modules/metadata-service/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ variable "metadata_service_container_image" {
4747
description = "Container image for metadata service"
4848
}
4949

50+
variable "metadata_service_cpu" {
51+
type = number
52+
default = 512
53+
description = "ECS task CPU unit for metadata service"
54+
}
55+
56+
variable "metadata_service_memory" {
57+
type = number
58+
default = 1024
59+
description = "ECS task memory in MiB for metadata service"
60+
}
61+
5062
variable "metaflow_vpc_id" {
5163
type = string
5264
description = "ID of the Metaflow VPC this SageMaker notebook instance is to be deployed in"

0 commit comments

Comments
 (0)