Skip to content

Commit f0a0cfa

Browse files
authored
feat: enable fault injection (#261)
1 parent 1f82a11 commit f0a0cfa

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,13 @@ Available targets:
213213
| Name | Version |
214214
|------|---------|
215215
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.0 |
216-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.77 |
216+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.85 |
217217

218218
## Providers
219219

220220
| Name | Version |
221221
|------|---------|
222-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.77 |
222+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.85 |
223223

224224
## Modules
225225

@@ -292,6 +292,7 @@ Available targets:
292292
| <a name="input_efs_volumes"></a> [efs\_volumes](#input\_efs\_volumes) | Task EFS volume definitions as list of configuration objects. You can define multiple EFS volumes on the same task definition, but a single volume can only have one `efs_volume_configuration`. | <pre>list(object({<br/> host_path = string<br/> name = string<br/> efs_volume_configuration = list(object({<br/> file_system_id = string<br/> root_directory = string<br/> transit_encryption = string<br/> transit_encryption_port = string<br/> authorization_config = list(object({<br/> access_point_id = string<br/> iam = string<br/> }))<br/> }))<br/> }))</pre> | `[]` | no |
293293
| <a name="input_enable_all_egress_rule"></a> [enable\_all\_egress\_rule](#input\_enable\_all\_egress\_rule) | A flag to enable/disable adding the all ports egress rule to the service security group | `bool` | `true` | no |
294294
| <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 |
295+
| <a name="input_enable_fault_injection"></a> [enable\_fault\_injection](#input\_enable\_fault\_injection) | Enables fault injection and allows for fault injection requests to be accepted from the task's containers | `bool` | `false` | no |
295296
| <a name="input_enable_icmp_rule"></a> [enable\_icmp\_rule](#input\_enable\_icmp\_rule) | Specifies whether to enable ICMP on the service security group | `bool` | `false` | no |
296297
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
297298
| <a name="input_environment"></a> [environment](#input\_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no |

docs/terraform.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
| Name | Version |
55
|------|---------|
66
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.0 |
7-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.77 |
7+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.85 |
88

99
## Providers
1010

1111
| Name | Version |
1212
|------|---------|
13-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.77 |
13+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.85 |
1414

1515
## Modules
1616

@@ -83,6 +83,7 @@
8383
| <a name="input_efs_volumes"></a> [efs\_volumes](#input\_efs\_volumes) | Task EFS volume definitions as list of configuration objects. You can define multiple EFS volumes on the same task definition, but a single volume can only have one `efs_volume_configuration`. | <pre>list(object({<br/> host_path = string<br/> name = string<br/> efs_volume_configuration = list(object({<br/> file_system_id = string<br/> root_directory = string<br/> transit_encryption = string<br/> transit_encryption_port = string<br/> authorization_config = list(object({<br/> access_point_id = string<br/> iam = string<br/> }))<br/> }))<br/> }))</pre> | `[]` | no |
8484
| <a name="input_enable_all_egress_rule"></a> [enable\_all\_egress\_rule](#input\_enable\_all\_egress\_rule) | A flag to enable/disable adding the all ports egress rule to the service security group | `bool` | `true` | no |
8585
| <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 |
86+
| <a name="input_enable_fault_injection"></a> [enable\_fault\_injection](#input\_enable\_fault\_injection) | Enables fault injection and allows for fault injection requests to be accepted from the task's containers | `bool` | `false` | no |
8687
| <a name="input_enable_icmp_rule"></a> [enable\_icmp\_rule](#input\_enable\_icmp\_rule) | Specifies whether to enable ICMP on the service security group | `bool` | `false` | no |
8788
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
8889
| <a name="input_environment"></a> [environment](#input\_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no |

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ resource "aws_ecs_task_definition" "default" {
6969
execution_role_arn = length(local.task_exec_role_arn) > 0 ? local.task_exec_role_arn : one(aws_iam_role.ecs_exec[*]["arn"])
7070
task_role_arn = length(local.task_role_arn) > 0 ? local.task_role_arn : one(aws_iam_role.ecs_task[*]["arn"])
7171
track_latest = var.track_latest
72+
enable_fault_injection = var.enable_fault_injection
7273

7374
dynamic "proxy_configuration" {
7475
for_each = var.proxy_configuration == null ? [] : [var.proxy_configuration]

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -599,3 +599,9 @@ variable "track_latest" {
599599
description = "Whether should track latest task definition or the one created with the resource."
600600
default = false
601601
}
602+
603+
variable "enable_fault_injection" {
604+
type = bool
605+
description = "Enables fault injection and allows for fault injection requests to be accepted from the task's containers"
606+
default = false
607+
}

versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.77"
7+
version = ">= 5.85"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)