Skip to content

Commit

Permalink
Expose placement constraints on easy EC2 module
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelaw320 committed Jan 12, 2024
1 parent 1e42d45 commit 11ac14b
Show file tree
Hide file tree
Showing 3 changed files with 9 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_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_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_placement_constraints"></a> [placement\_constraints](#input\_placement\_constraints) | Placement constraints for Task Definition. List of map. [Terraform Docs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition#placement_constraints) | `list(any)` | `[]` | 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 |
| <a name="input_runtime_platform"></a> [runtime\_platform](#input\_runtime\_platform) | Runtime platform (operating system and CPU architecture) that containers may use. Defined as map argument. [Terraform Docs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition#runtime_platform) | `any` | `null` | no |
Expand Down
2 changes: 2 additions & 0 deletions modules/simple/ec2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ module "ec2" {
}
]

placement_constraints = var.placement_constraints

wait_for_steady_state = var.wait_for_steady_state

enable_ecs_managed_tags = var.enable_ecs_managed_tags
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 @@ -149,6 +149,12 @@ variable "capacity_provider_arn" {
type = string
}

variable "placement_constraints" {
description = "Placement constraints for Task Definition. List of map. [Terraform Docs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition#placement_constraints)"
default = []
type = list(any)
}

variable "enable_deployment_circuit_breaker_without_rollback" {
description = "Enable Deployment Circuit Breaker without Rollback."
default = false
Expand Down

0 comments on commit 11ac14b

Please sign in to comment.