Skip to content

Commit

Permalink
feat: enable fault injection (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkul authored Feb 13, 2025
1 parent 1f82a11 commit f0a0cfa
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,13 @@ Available targets:
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.77 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.85 |

## Providers

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

## Modules

Expand Down Expand Up @@ -292,6 +292,7 @@ Available targets:
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
| <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 |
Expand Down
5 changes: 3 additions & 2 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.77 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.85 |

## Providers

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

## Modules

Expand Down Expand Up @@ -83,6 +83,7 @@
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
| <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 |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ resource "aws_ecs_task_definition" "default" {
execution_role_arn = length(local.task_exec_role_arn) > 0 ? local.task_exec_role_arn : one(aws_iam_role.ecs_exec[*]["arn"])
task_role_arn = length(local.task_role_arn) > 0 ? local.task_role_arn : one(aws_iam_role.ecs_task[*]["arn"])
track_latest = var.track_latest
enable_fault_injection = var.enable_fault_injection

dynamic "proxy_configuration" {
for_each = var.proxy_configuration == null ? [] : [var.proxy_configuration]
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -599,3 +599,9 @@ variable "track_latest" {
description = "Whether should track latest task definition or the one created with the resource."
default = false
}

variable "enable_fault_injection" {
type = bool
description = "Enables fault injection and allows for fault injection requests to be accepted from the task's containers"
default = false
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.77"
version = ">= 5.85"
}
}
}

0 comments on commit f0a0cfa

Please sign in to comment.