diff --git a/solr-on-ecs.yml b/solr-on-ecs.yml index c7c3356..50b43b5 100644 --- a/solr-on-ecs.yml +++ b/solr-on-ecs.yml @@ -39,6 +39,10 @@ provision: required: false type: string details: "The Solr setup file for initialization of cores/authentication/et cetera..." + - field_name: efsProvisionedThroughput + required: false + type: number + details: "The throughput, measured in MiB/s, that you want to provision for the file system" computed_inputs: - name: instance_name type: string @@ -70,6 +74,10 @@ provision: default: "https://raw.githubusercontent.com/GSA/catalog.data.gov/main/solr/solr_setup.sh" overwrite: false type: string + - name: efsProvisionedThroughput + default: 1 + overwrite: false + type: number - name: region type: string details: "The AWS region in which to create k8s instances" diff --git a/terraform/standalone_ecs/provision/efs.tf b/terraform/standalone_ecs/provision/efs.tf index 03ba95f..9238a64 100644 --- a/terraform/standalone_ecs/provision/efs.tf +++ b/terraform/standalone_ecs/provision/efs.tf @@ -21,6 +21,10 @@ resource "aws_kms_key" "solr-data-key" { resource "aws_efs_file_system" "solr-data" { creation_token = "solr-${local.id_64char}-data" + performance_mode = "generalPurpose" + throughput_mode = "provisioned" + provisioned_throughput_in_mibps = var.efsProvisionedThroughput + # encryption-at-rest encrypted = true kms_key_id = aws_kms_key.solr-data-key.arn diff --git a/terraform/standalone_ecs/provision/variables.tf b/terraform/standalone_ecs/provision/variables.tf index 988d780..8bf9f79 100644 --- a/terraform/standalone_ecs/provision/variables.tf +++ b/terraform/standalone_ecs/provision/variables.tf @@ -49,3 +49,9 @@ variable "setupLink" { description = "The Solr setup file for initialization of cores/authentication/et cetera..." default = "https://raw.githubusercontent.com/GSA/catalog.data.gov/main/solr/solr_setup.sh" } + +variable "efsProvisionedThroughput" { + type = number + description = "The throughput, measured in MiB/s, that you want to provision for the file system" + default = 1 +} diff --git a/terraform/standalone_ecs/provision/vpc.tf b/terraform/standalone_ecs/provision/vpc.tf index f76a10b..934d091 100644 --- a/terraform/standalone_ecs/provision/vpc.tf +++ b/terraform/standalone_ecs/provision/vpc.tf @@ -27,7 +27,7 @@ module "vpc" { } resource "aws_service_discovery_private_dns_namespace" "solr" { - name = "local" + name = "solr${local.lb_name}" description = "Internal solr-to-solr communication link" vpc = module.vpc.vpc_id }