Skip to content

Instantly share code, notes, and snippets.

@ulikabbq
Created December 1, 2019 22:51
Show Gist options
  • Save ulikabbq/e3fe3fb708489c999a3f054d21a0dd24 to your computer and use it in GitHub Desktop.
Save ulikabbq/e3fe3fb708489c999a3f054d21a0dd24 to your computer and use it in GitHub Desktop.
resource "aws_ecs_service" "grafana" {
name = "grafana"
cluster = aws_ecs_cluster.grafana.name
task_definition = aws_ecs_task_definition.grafana.arn
desired_count = var.grafana_count
launch_type = "FARGATE"
network_configuration {
security_groups = [aws_security_group.grafana_ecs.id]
subnets = var.subnets
}
load_balancer {
target_group_arn = aws_lb_target_group.grafana.arn
container_name = "grafana"
container_port = 3000
}
depends_on = [aws_lb.grafana]
lifecycle {
ignore_changes = [desired_count, task_definition]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment