Skip to content

Commit

Permalink
Merge pull request #42 from GSA/provisioned-efs-throughput
Browse files Browse the repository at this point in the history
Configure Provisioned EFS Throughput
  • Loading branch information
nickumia-reisys authored Jul 5, 2022
2 parents 8fb476a + 2bb1dc9 commit de816dd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
8 changes: 8 additions & 0 deletions solr-on-ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions terraform/standalone_ecs/provision/efs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions terraform/standalone_ecs/provision/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion terraform/standalone_ecs/provision/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit de816dd

Please sign in to comment.