guidopili / terraform-aws-ecs-services

A terraform module to create ECS services inside a cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS Elastic Container Services (ECS) Terraform module

Requirements

Name Version
terraform ~> 1.3
aws ~> 4.53

Providers

Name Version
aws ~> 4.53

Modules

No Modules.

Resources

Name
aws_ecs_service
aws_service_discovery_private_dns_namespace
aws_service_discovery_service

Inputs

Name Description Type Default Required
ecs_cluster_arn The ARN of the ECS Cluster where these services will be created string n/a yes
enable_service_discovery Whether to enable service discovery for tasks bool n/a yes
internal_dns_name Internal DNS name, required when enabling service discovery string "" no
service_discovery_health_check_failure_threshold The health check failure threshold number 1 no
service_discovery_record_ttl The DNS record ttl used in service discovery number 10 no
service_discovery_record_type The DNS record type used in service discovery string "A" no
service_discovery_routing_policy The routing policy used in service discovery string "MULTIVALUE" no
services The list of services to be created
map(object({
task_definition_arn = string
launch_type = optional(string)
scheduling_strategy = optional(string)

desired_count = optional(number)
deployment_minimum_healthy_percent = optional(number)
deployment_maximum_percent = optional(number)
health_check_grace_period_seconds = optional(number)

load_balancers = map(object({
elb_name = optional(string)
target_group_arn = optional(string)
container_name = string
container_port = number
}))

capacity_provider_strategy = optional(object({
base = optional(number)
capacity_provider = string
weight = optional(number)
}))

deployment_circuit_breaker = optional(object({
enable = bool
rollback = bool
}))

deployment_controller = optional(object({
type = optional(string)
}))

placement_constraints = map(object({
type = string
expression = optional(string)
}))

ordered_placement_strategies = map(object({
type = string
field = optional(string)
}))

service_registry_configuration = optional(object({
container_port = number
container_name = string
port = number
}))

network_configuration = optional(object({
subnets = list(string)
security_groups = list(string)
assign_public_ip = optional(bool)
}))
}))
n/a yes
vpc_id The VPC identifier string n/a yes

Outputs

Name Description
services The created services IDs

About

A terraform module to create ECS services inside a cluster

License:Other


Languages

Language:HCL 100.0%