up structure for tf
This commit is contained in:
parent
a3c818ef83
commit
e31fdc2c02
874 changed files with 3019 additions and 67372 deletions
34
ecs_service_frontend.tf
Normal file
34
ecs_service_frontend.tf
Normal file
|
@ -0,0 +1,34 @@
|
|||
###############################################################################
|
||||
# ECS service front
|
||||
################################################################################
|
||||
resource "aws_ecs_service" "frontend" {
|
||||
name = "${local.name_prefix}-frontend"
|
||||
cluster = data.aws_ssm_parameter.ecs_cluster_id.value
|
||||
task_definition = aws_ecs_task_definition.frontend.arn
|
||||
desired_count = var.num_workers
|
||||
platform_version = "LATEST" # "1.4.0"
|
||||
network_configuration {
|
||||
subnets = data.aws_subnets.frontend_subnets.ids
|
||||
# subnets = data.aws_subnets.backend_subnets.ids
|
||||
security_groups = data.aws_security_groups.allin.ids
|
||||
}
|
||||
capacity_provider_strategy {
|
||||
base = 1
|
||||
capacity_provider = "FARGATE"
|
||||
weight = 100
|
||||
}
|
||||
deployment_circuit_breaker {
|
||||
enable = true
|
||||
rollback = true
|
||||
}
|
||||
deployment_controller {
|
||||
type = "ECS"
|
||||
}
|
||||
|
||||
load_balancer {
|
||||
target_group_arn = data.aws_ssm_parameter.target_group_arn.value
|
||||
container_name = "${local.name_prefix}-frontend"
|
||||
container_port = 8080
|
||||
}
|
||||
tags = merge(local.required_tags, var.tags)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue