Skip to content

Commit

Permalink
feat: Add EFS performance settings. (#339)
Browse files Browse the repository at this point in the history
* feat: Add EFS performance settings.

Adding EFS performance settings as the default EFS performance settings
might not provide enough performance to initial Atlantis installs that
have to pull large repos while the EFS volume is small as the default
mode provides performance relative to disk usage.

In testing the default EFS mode provided initial performance so far away
from ephemeral storage that Atlantis became unusable.

* Change default of efs throughput mode to null

* Removed variable validation as requested.

---------

Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
  • Loading branch information
lazzurs and bryantbiggs authored May 12, 2023
1 parent 984a5de commit ba3ecf9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ allow_github_webhooks = true
| <a name="input_ecs_task_memory"></a> [ecs\_task\_memory](#input\_ecs\_task\_memory) | The amount (in MiB) of memory used by the task | `number` | `512` | no |
| <a name="input_efs_file_system_encrypted"></a> [efs\_file\_system\_encrypted](#input\_efs\_file\_system\_encrypted) | If true, the disk will be encrypted. | `bool` | `false` | no |
| <a name="input_efs_file_system_token"></a> [efs\_file\_system\_token](#input\_efs\_file\_system\_token) | Be able to import other EFS instance created by the other module | `string` | `""` | no |
| <a name="input_efs_provisioned_throughput_in_mibps"></a> [efs\_provisioned\_throughput\_in\_mibps](#input\_efs\_provisioned\_throughput\_in\_mibps) | The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with efs\_throughput\_mode set to provisioned | `number` | `null` | no |
| <a name="input_efs_throughput_mode"></a> [efs\_throughput\_mode](#input\_efs\_throughput\_mode) | (Optional) Throughput mode for the file system. Defaults to bursting. Valid values: bursting, provisioned, or elastic. When using provisioned, also set provisioned\_throughput\_in\_mibps. | `string` | `null` | no |
| <a name="input_enable_ecs_managed_tags"></a> [enable\_ecs\_managed\_tags](#input\_enable\_ecs\_managed\_tags) | Specifies whether to enable Amazon ECS managed tags for the tasks within the service | `bool` | `false` | no |
| <a name="input_enable_ephemeral_storage"></a> [enable\_ephemeral\_storage](#input\_enable\_ephemeral\_storage) | Enable to use Fargate Ephemeral Storage | `bool` | `false` | no |
| <a name="input_entrypoint"></a> [entrypoint](#input\_entrypoint) | The entry point that is passed to the container | `list(string)` | `null` | no |
Expand Down
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,9 @@ resource "aws_efs_file_system" "this" {

creation_token = coalesce(var.efs_file_system_token, var.name)

throughput_mode = var.efs_throughput_mode
provisioned_throughput_in_mibps = var.efs_provisioned_throughput_in_mibps

encrypted = var.efs_file_system_encrypted
}

Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,18 @@ variable "efs_file_system_token" {
default = ""
}

variable "efs_throughput_mode" {
description = "(Optional) Throughput mode for the file system. Defaults to bursting. Valid values: bursting, provisioned, or elastic. When using provisioned, also set provisioned_throughput_in_mibps."
type = string
default = null
}

variable "efs_provisioned_throughput_in_mibps" {
description = "The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with efs_throughput_mode set to provisioned"
type = number
default = null
}

variable "alb_ip_address_type" {
description = "The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 and dualstack"
type = string
Expand Down

0 comments on commit ba3ecf9

Please sign in to comment.