Skip to content

Commit 792a685

Browse files
authored
feat: Enable encrypt function on EFS (#296)
1 parent 4de8562 commit 792a685

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ allow_github_webhooks = true
359359
| <a name="input_ecs_service_platform_version"></a> [ecs\_service\_platform\_version](#input\_ecs\_service\_platform\_version) | The platform version on which to run your service | `string` | `"LATEST"` | no |
360360
| <a name="input_ecs_task_cpu"></a> [ecs\_task\_cpu](#input\_ecs\_task\_cpu) | The number of cpu units used by the task | `number` | `256` | no |
361361
| <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 |
362+
| <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 |
362363
| <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 |
363364
| <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 |
364365
| <a name="input_enable_ephemeral_storage"></a> [enable\_ephemeral\_storage](#input\_enable\_ephemeral\_storage) | Enable to use Fargate Ephemeral Storage | `bool` | `false` | no |

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,8 @@ resource "aws_efs_file_system" "this" {
447447
count = var.enable_ephemeral_storage ? 0 : 1
448448

449449
creation_token = coalesce(var.efs_file_system_token, var.name)
450+
451+
encrypted = var.efs_file_system_encrypted
450452
}
451453

452454
resource "aws_efs_mount_target" "this" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,12 @@ variable "ephemeral_storage_size" {
701701
}
702702
}
703703

704+
variable "efs_file_system_encrypted" {
705+
description = "If true, the disk will be encrypted."
706+
type = bool
707+
default = false
708+
}
709+
704710
variable "efs_file_system_token" {
705711
description = "Be able to import other EFS instance created by the other module"
706712
type = string

0 commit comments

Comments
 (0)