Skip to content

Commit 5808cb5

Browse files
author
Mao-hsiang Lien
committed
feat: Be able to import exist EFS file-system
1 parent b327a15 commit 5808cb5

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
@@ -357,6 +357,7 @@ allow_github_webhooks = true
357357
| <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 |
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 |
360+
| <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 |
360361
| <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 |
361362
| <a name="input_enable_ephemeral_storage"></a> [enable\_ephemeral\_storage](#input\_enable\_ephemeral\_storage) | Enable to use Fargate Ephemeral Storage | `bool` | `false` | no |
362363
| <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

452452
resource "aws_efs_mount_target" "this" {

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,12 @@ variable "ephemeral_storage_size" {
701701
}
702702
}
703703

704+
variable "efs_file_system_token" {
705+
description = "Be able to import other EFS instance created by the other module"
706+
type = string
707+
default = ""
708+
}
709+
704710
variable "alb_ip_address_type" {
705711
description = "The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4 and dualstack"
706712
type = string

0 commit comments

Comments
 (0)