Skip to content

Commit dcee8be

Browse files
authored
feat: Add volume_initialization_rate for managed EBS volumes (#403)
* feat(service): add volume_initialization_rate for managed EBS volumes Add support for the `volume_initialization_rate` attribute in the managed EBS volume configuration for ECS services. This allows configuring the rate at which the volume is initialized. Changes: - Add volume_initialization_rate to aws_ecs_service resources - Update variable definitions in modules/service/variables.tf - Update variable definitions in root variables.tf * chore: update docs
1 parent 13f4995 commit dcee8be

5 files changed

Lines changed: 14 additions & 10 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

modules/service/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ module "ecs_service" {
349349
| <a name="input_track_latest"></a> [track\_latest](#input\_track\_latest) | Whether should track latest `ACTIVE` task definition on AWS or the one created with the resource stored in state. Useful in the event the task definition is modified outside of this resource | `bool` | `true` | no |
350350
| <a name="input_triggers"></a> [triggers](#input\_triggers) | Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `timestamp()` | `map(string)` | `null` | no |
351351
| <a name="input_volume"></a> [volume](#input\_volume) | Configuration block for volumes that containers in your task may use | <pre>map(object({<br/> configure_at_launch = optional(bool)<br/> docker_volume_configuration = optional(object({<br/> autoprovision = optional(bool)<br/> driver = optional(string)<br/> driver_opts = optional(map(string))<br/> labels = optional(map(string))<br/> scope = optional(string)<br/> }))<br/> efs_volume_configuration = optional(object({<br/> authorization_config = optional(object({<br/> access_point_id = optional(string)<br/> iam = optional(string)<br/> }))<br/> file_system_id = string<br/> root_directory = optional(string)<br/> transit_encryption = optional(string)<br/> transit_encryption_port = optional(number)<br/> }))<br/> fsx_windows_file_server_volume_configuration = optional(object({<br/> authorization_config = optional(object({<br/> credentials_parameter = string<br/> domain = string<br/> }))<br/> file_system_id = string<br/> root_directory = string<br/> }))<br/> host_path = optional(string)<br/> name = optional(string)<br/> }))</pre> | `null` | no |
352-
| <a name="input_volume_configuration"></a> [volume\_configuration](#input\_volume\_configuration) | Configuration for a volume specified in the task definition as a volume that is configured at launch time | <pre>object({<br/> name = string<br/> managed_ebs_volume = object({<br/> encrypted = optional(bool)<br/> file_system_type = optional(string)<br/> iops = optional(number)<br/> kms_key_id = optional(string)<br/> size_in_gb = optional(number)<br/> snapshot_id = optional(string)<br/> tag_specifications = optional(list(object({<br/> propagate_tags = optional(string, "TASK_DEFINITION")<br/> resource_type = string<br/> tags = optional(map(string))<br/> })))<br/> throughput = optional(number)<br/> volume_type = optional(string)<br/> })<br/> })</pre> | `null` | no |
352+
| <a name="input_volume_configuration"></a> [volume\_configuration](#input\_volume\_configuration) | Configuration for a volume specified in the task definition as a volume that is configured at launch time | <pre>object({<br/> name = string<br/> managed_ebs_volume = object({<br/> encrypted = optional(bool)<br/> file_system_type = optional(string)<br/> iops = optional(number)<br/> kms_key_id = optional(string)<br/> size_in_gb = optional(number)<br/> snapshot_id = optional(string)<br/> tag_specifications = optional(list(object({<br/> propagate_tags = optional(string, "TASK_DEFINITION")<br/> resource_type = string<br/> tags = optional(map(string))<br/> })))<br/> throughput = optional(number)<br/> volume_initialization_rate = optional(number)<br/> volume_type = optional(string)<br/> })<br/> })</pre> | `null` | no |
353353
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The VPC ID where to deploy the task or service. If not provided, the VPC ID is derived from the subnets provided | `string` | `null` | no |
354354
| <a name="input_vpc_lattice_configurations"></a> [vpc\_lattice\_configurations](#input\_vpc\_lattice\_configurations) | The VPC Lattice configuration for your service that allows Lattice to connect, secure, and monitor your service across multiple accounts and VPCs | <pre>object({<br/> role_arn = string<br/> target_group_arn = string<br/> port_name = string<br/> })</pre> | `null` | no |
355355
| <a name="input_wait_for_steady_state"></a> [wait\_for\_steady\_state](#input\_wait\_for\_steady\_state) | If true, Terraform will wait for the service to reach a steady state before continuing. Default is `false` | `bool` | `null` | no |

modules/service/main.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,9 @@ resource "aws_ecs_service" "this" {
341341
}
342342
}
343343

344-
throughput = managed_ebs_volume.value.throughput
345-
volume_type = managed_ebs_volume.value.volume_type
344+
throughput = managed_ebs_volume.value.throughput
345+
volume_initialization_rate = managed_ebs_volume.value.volume_initialization_rate
346+
volume_type = managed_ebs_volume.value.volume_type
346347
}
347348
}
348349
}
@@ -694,8 +695,9 @@ resource "aws_ecs_service" "ignore_task_definition" {
694695
}
695696
}
696697

697-
throughput = managed_ebs_volume.value.throughput
698-
volume_type = managed_ebs_volume.value.volume_type
698+
throughput = managed_ebs_volume.value.throughput
699+
volume_initialization_rate = managed_ebs_volume.value.volume_initialization_rate
700+
volume_type = managed_ebs_volume.value.volume_type
699701
}
700702
}
701703
}

modules/service/variables.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,9 @@ variable "volume_configuration" {
357357
resource_type = string
358358
tags = optional(map(string))
359359
})))
360-
throughput = optional(number)
361-
volume_type = optional(string)
360+
throughput = optional(number)
361+
volume_initialization_rate = optional(number)
362+
volume_type = optional(string)
362363
})
363364
})
364365
default = null

variables.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,9 @@ variable "services" {
773773
resource_type = string
774774
tags = optional(map(string))
775775
})))
776-
throughput = optional(number)
777-
volume_type = optional(string)
776+
throughput = optional(number)
777+
volume_initialization_rate = optional(number)
778+
volume_type = optional(string)
778779
})
779780
}))
780781
vpc_lattice_configurations = optional(object({

0 commit comments

Comments
 (0)