Skip to content

Commit

Permalink
Merge pull request #30 from HENNGE/simple-ec2-network-config
Browse files Browse the repository at this point in the history
Allow define network config with simple/ec2 module
  • Loading branch information
hanscg authored Feb 19, 2024
2 parents 2138718 + 5756232 commit 311e8e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/simple/ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ No resources.
| <a name="input_ignore_desired_count_changes"></a> [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 |
| <a name="input_memory"></a> [memory](#input\_memory) | Memory for this task | `number` | `null` | no |
| <a name="input_name"></a> [name](#input\_name) | The service name. | `string` | n/a | yes |
| <a name="input_network_configuration"></a> [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 |
| <a name="input_network_mode"></a> [network\_mode](#input\_network\_mode) | Network mode of the container, valid options are none, bridge, awsvpc, and host | `string` | `"bridge"` | no |
| <a name="input_propagate_tags"></a> [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 |
| <a name="input_proxy_configuration"></a> [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 |
Expand Down
1 change: 1 addition & 0 deletions modules/simple/ec2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions modules/simple/ec2/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 311e8e9

Please sign in to comment.