From 52afa7c44e5ae17b5d73a404aca5a46b14f6ed21 Mon Sep 17 00:00:00 2001 From: Bill Booth Date: Thu, 7 Sep 2023 15:37:55 -0700 Subject: [PATCH] add db_instance_type and db_engine_version to main (#55) --- README.md | 2 ++ main.tf | 3 +++ variables.tf | 11 +++++++++++ 3 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 8f80507..bd6de5f 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,8 @@ resource "local_file" "metaflow_config" { | [compute\_environment\_instance\_types](#input\_compute\_environment\_instance\_types) | The instance types for the compute environment | `list(string)` |
[
"c4.large",
"c4.xlarge",
"c4.2xlarge",
"c4.4xlarge",
"c4.8xlarge"
]
| no | | [compute\_environment\_max\_vcpus](#input\_compute\_environment\_max\_vcpus) | Maximum VCPUs for Batch Compute Environment [16-96] | `number` | `64` | no | | [compute\_environment\_min\_vcpus](#input\_compute\_environment\_min\_vcpus) | Minimum VCPUs for Batch Compute Environment [0-16] for EC2 Batch Compute Environment (ignored for Fargate) | `number` | `8` | no | +| [db\_engine\_version](#input\_db\_engine\_version) | n/a | `string` | `"11"` | no | +| [db\_instance\_type](#input\_db\_instance\_type) | RDS instance type to launch for PostgresQL database. | `string` | `"db.t2.small"` | no | | [enable\_custom\_batch\_container\_registry](#input\_enable\_custom\_batch\_container\_registry) | Provisions infrastructure for custom Amazon ECR container registry if enabled | `bool` | `false` | no | | [enable\_step\_functions](#input\_enable\_step\_functions) | Provisions infrastructure for step functions if enabled | `bool` | n/a | yes | | [extra\_ui\_backend\_env\_vars](#input\_extra\_ui\_backend\_env\_vars) | Additional environment variables for UI backend container | `map(string)` | `{}` | no | diff --git a/main.tf b/main.tf index f789071..d8c7127 100644 --- a/main.tf +++ b/main.tf @@ -11,6 +11,9 @@ module "metaflow-datastore" { subnet1_id = var.subnet1_id subnet2_id = var.subnet2_id + db_instance_type = var.db_instance_type + db_engine_version = var.db_engine_version + standard_tags = var.tags } diff --git a/variables.tf b/variables.tf index 9647f5b..1852a86 100644 --- a/variables.tf +++ b/variables.tf @@ -61,6 +61,17 @@ variable "compute_environment_egress_cidr_blocks" { description = "CIDR blocks to which egress is allowed from the Batch Compute environment's security group" } +variable "db_instance_type" { + type = string + description = "RDS instance type to launch for PostgresQL database." + default = "db.t2.small" +} + +variable "db_engine_version" { + type = string + default = "11" +} + variable "launch_template_http_endpoint" { type = string description = "Whether the metadata service is available. Can be 'enabled' or 'disabled'"