Skip to content

Commit 7f8797f

Browse files
author
Mao-hsiang Lien
committed
feat: Be able to import exist EFS file-system
1 parent 3da338e commit 7f8797f

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ allow_github_webhooks = true
358358
| <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 |
359359
| <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 |
360360
| <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 |
361+
| <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 |
361362
| <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 |
362363
| <a name="input_enable_ephemeral_storage"></a> [enable\_ephemeral\_storage](#input\_enable\_ephemeral\_storage) | Enable to use Fargate Ephemeral Storage | `bool` | `false` | no |
363364
| <a name="input_entrypoint"></a> [entrypoint](#input\_entrypoint) | The entry point that is passed to the container | `list(string)` | `null` | no |

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ resource "aws_route53_record" "atlantis_aaaa" {
446446
resource "aws_efs_file_system" "this" {
447447
count = var.enable_ephemeral_storage ? 0 : 1
448448

449-
creation_token = var.name
449+
creation_token = var.efs_file_system_token != "" ? var.efs_file_system_token : var.name
450450

451451
encrypted = var.efs_file_system_encrypted
452452
}

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,12 @@ variable "efs_file_system_encrypted" {
707707
default = false
708708
}
709709

710+
variable "efs_file_system_token" {
711+
description = "Be able to import other EFS instance created by the other module"
712+
type = string
713+
default = ""
714+
}
715+
710716
variable "alb_ip_address_type" {
711717
description = "The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 and dualstack"
712718
type = string

0 commit comments

Comments
 (0)