diff --git a/modules/simple/ec2/README.md b/modules/simple/ec2/README.md index 4279a43..9ce38c4 100644 --- a/modules/simple/ec2/README.md +++ b/modules/simple/ec2/README.md @@ -63,6 +63,7 @@ No resources. | [ignore\_desired\_count\_changes](#input\_ignore\_desired\_count\_changes) | Ignores any changes to `desired_count` parameter after apply. Note updating this value will destroy the existing service and recreate it. | `bool` | `false` | no | | [memory](#input\_memory) | Memory for this task | `number` | `null` | no | | [name](#input\_name) | The service name. | `string` | n/a | yes | +| [network\_configuration](#input\_network\_configuration) | Map of a network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. [Terraform Docs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_service#network_configuration) | `any` | `null` | no | | [network\_mode](#input\_network\_mode) | Network mode of the container, valid options are none, bridge, awsvpc, and host | `string` | `"bridge"` | no | | [propagate\_tags](#input\_propagate\_tags) | Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`. | `string` | `null` | no | | [proxy\_configuration](#input\_proxy\_configuration) | The proxy configuration details for the App Mesh proxy. Defined as map argument. [Terraform Docs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition#proxy_configuration) | `any` | `null` | no | diff --git a/modules/simple/ec2/main.tf b/modules/simple/ec2/main.tf index 7ab93a7..3887998 100644 --- a/modules/simple/ec2/main.tf +++ b/modules/simple/ec2/main.tf @@ -6,6 +6,7 @@ module "ec2" { container_definitions = var.container_definitions desired_count = var.desired_count ignore_desired_count_changes = var.ignore_desired_count_changes + network_configuration = var.network_configuration iam_daemon_role = var.iam_daemon_role iam_task_role = var.iam_task_role diff --git a/modules/simple/ec2/variables.tf b/modules/simple/ec2/variables.tf index 7510210..6124361 100644 --- a/modules/simple/ec2/variables.tf +++ b/modules/simple/ec2/variables.tf @@ -77,6 +77,12 @@ variable "network_mode" { type = string } +variable "network_configuration" { + description = "Map of a network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. [Terraform Docs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_service#network_configuration)" + default = null + type = any +} + variable "elb_name" { description = "Name of ELB (Classic ELB) to associate with the service" default = null