This module deploy an ECS service, useful for Continuos Deployment
## Required filed to use an existing cluster
existing_cluster_name = dependency.application.outputs.cluster.name
vpc_id = dependency.networking.outputs.vpc.id
service_policies = [
{
actions = [
"s3:ListBucket",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:ReplicateObject",
"s3:DeleteObject"
]
resources = [
dependency.application.outputs.cms_assets_bucket.arn,
"${dependency.application.outputs.cms_assets_bucket.arn}/*"
]
},
{
actions = [
"ses:SendEmail",
"ses:SendRawEmail"
]
resources = ["*"]
}
]
## Trigger input that specify service trigger, supported only ALB right now
trigger = {
lb : {
name : dependency.application.outputs.alb.name
rules : [
{
path_patterns = ["/*"]
hosts = ["cms.assistdigital.it"]
}
]
}
}
healthcheck = {
port = 8055
path : "/server/ping"
ecs_enabled : false
}
service = {
name = "cms"
version = get_env("IMAGE_VERSION", "null")
port = 8055
capacity_provider = [
{
provider = "FARGATE_SPOT"
base = 1
weight = 1
},
{
provider = "FARGATE"
base = 0
weight = 1
}
]
No requirements.
Name | Version |
---|---|
aws | 4.0.0 |
No modules.
Name | Description | Type | Default | Required |
---|---|---|---|---|
alarm_topic_name | If specified, it enable error alarms to a specific sns topic. Default null. | string |
null |
no |
existing_cluster_name | The existing ECS Cluster name. | string |
n/a | yes |
healthcheck | Service Healthcheck configuration. Default to root path on port 80 only from alb if present. | object({ |
{ |
no |
service | The service configuration parameters. | object({ |
n/a | yes |
service_autoscaling | Service autoscaling parameters with cpu, memory or schedule metrics. Default disabled | object({ |
{ |
no |
service_params | Service deployment parameters. Default 512 cpu, 1024 memory and 1 private instance. | object({ |
{ |
no |
service_policies | List of all iam policy to attach to the service. Default empty. | list(object({ |
[] |
no |
service_registry_name | Service registry name. If specified, it creates a private DNS for the service. | string |
null |
no |
trigger | The Service trigger, supported only alb right now. Default null. | object({ |
null |
no |
vpc_id | Id of the VPC where ecs have to be. | string |
n/a | yes |
Name | Description |
---|---|
ecs_service | n/a |