Skip to content

Commit

Permalink
Add README and define types for variables for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Dementyev committed Apr 14, 2021
1 parent c7d5540 commit 11b9ad4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# terraform-aws-ecs-service

This module creates an ECS service. It supports load balanced services if required.

Has additional security measures that can be optionally enabled, such as RO filesystem, or "run as specified user".
19 changes: 14 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,50 +1,59 @@
variable "cluster_name" {
description = "Name of the ECS cluster"
type = string
}

variable "service_name" {
description = "Name of the ECS service"
type = string
}

variable "target_group_name" {
description = "Name of the ALB target group. Defaults to the `cluster_name` if not set"
type = string
default = ""
}

variable "target_group_names" {
description = "Names of the ALB target groups. Defaults to the `[cluster_name]` if not set"
type = list(string)
default = []
}


variable "environment" {
description = "Enviropnment vars to pass to the container. Note: they will be visible in the task definition, so please don't pass any secrets here."
type = map
type = map(any)
default = {}

}

variable "image" {
description = "The image to use"
description = "The Docker image to use"
type = string
}

variable "cpu" {
description = "Amount of CPU to use"
type = number
default = 0
}

variable "essential" {
description = "Exit the task if contaner exits"
type = bool
default = true
}

variable "memory" {
description = "Amount of maximum memory the container can use"
type = number
default = 512
}

variable "memory_reservation" {
description = "Amount of reserved memory for the container"
type = number
default = 256
}

Expand All @@ -70,7 +79,7 @@ variable "task_role_arn" {
}

variable "port_mappings" {
type = list
type = list(any)
default = []
}

Expand Down Expand Up @@ -104,14 +113,14 @@ variable "desired_count" {
}

variable "init_process_enabled" {
type = bool
description = "Use embdedded to Docker tini init process that correctly reaps zombie processes"
type = bool
default = true
}

variable "user" {
type = string
description = "Run container as the specified user. Formats are: user, user:group, uid, uid:gid, user:gid, uid:group"
type = string
default = ""
}

Expand Down

0 comments on commit 11b9ad4

Please sign in to comment.