diff --git a/README.md b/README.md index e3c1aee0..ae51fe71 100644 --- a/README.md +++ b/README.md @@ -317,6 +317,7 @@ module "default_backend_web_app" { | [region](#input\_region) | AWS Region for S3 bucket | `string` | `null` | no | | [repo\_name](#input\_repo\_name) | GitHub repository name of the application to be built and deployed to ECS | `string` | `""` | no | | [repo\_owner](#input\_repo\_owner) | GitHub Organization or Username | `string` | `""` | no | +| [resource\_requirements](#input\_resource\_requirements) | The type and amount of a resource to assign to a container. The only supported resource is a GPU. |
list(object({
type = string
value = string
})) | `null` | no |
| [runtime\_platform](#input\_runtime\_platform) | Zero or one runtime platform configurations that containers in your task may use.list(object({
name = string
valueFrom = string
})) | `null` | no |
| [service\_registries](#input\_service\_registries) | The service discovery registries for the service. The maximum number of service\_registries blocks is 1. The currently supported service registry is Amazon Route 53 Auto Naming Service - `aws_service_discovery_service`; see `service_registries` docs https://www.terraform.io/docs/providers/aws/r/ecs_service.html#service_registries-1 | list(object({
registry_arn = string
port = optional(number)
container_name = optional(string)
container_port = optional(number)
})) | `[]` | no |
diff --git a/main.tf b/main.tf
index cc26d903..e6522912 100644
--- a/main.tf
+++ b/main.tf
@@ -96,6 +96,7 @@ module "container_definition" {
mount_points = var.mount_points
container_depends_on = local.container_depends_on
repository_credentials = var.container_repo_credentials
+ resource_requirements = var.resource_requirements
linux_parameters = merge(
var.linux_parameters,
var.exec_enabled ? { initProcessEnabled = true } : {}
diff --git a/variables.tf b/variables.tf
index cba8d7f0..f8e5e62b 100644
--- a/variables.tf
+++ b/variables.tf
@@ -150,6 +150,16 @@ variable "ignore_changes_desired_count" {
default = false
}
+# https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ResourceRequirement.html
+variable "resource_requirements" {
+ type = list(object({
+ type = string
+ value = string
+ }))
+ description = "The type and amount of a resource to assign to a container. The only supported resource is a GPU."
+ default = null
+}
+
variable "system_controls" {
type = list(map(string))
description = "A list of namespaced kernel parameters to set in the container, mapping to the --sysctl option to docker run. This is a list of maps: { namespace = \"\", value = \"\"}"