Deploy retool and temporal services on aws fargate cluster

Dear support,

I am trying to deploy retool and temporal services on AWS fargate cluster. I am following these terraform modules and i am using this docker image for Temporal services ( frondend, worker, matching, history) and this docker image for Retool services ( main backend, jobs runner, workflows backend, workflows worker) .

I configured cloudflare zero trust to access retool instance via custom domain https://retool.mydomain.com but i am getting 530 error.

Also, i am using the following service discovery resources `resource "aws_service_discovery_private_dns_namespace" "retoolsvc" {
count = var.workflows_enabled ? 1 : 0
name = "retoolsvc"
description = "Service Discovery namespace for Retool deployment"
vpc = var.vpc_id
}

resource "aws_service_discovery_service" "retool_workflow_backend_service" {
count = var.workflows_enabled ? 1 : 0
name = "workflow-backend"

dns_config {
namespace_id = aws_service_discovery_private_dns_namespace.retoolsvc[0].id

dns_records {
  ttl  = 60
  type = "A"
}

routing_policy = "MULTIVALUE"

}

health_check_custom_config {
failure_threshold = 1
}
}andresource "aws_service_discovery_service" "temporal_frontend_service" {
name = "temporal"

dns_config {
namespace_id = var.private_dns_namespace_id

dns_records {
  ttl  = 60
  type = "A"
}

routing_policy = "MULTIVALUE"

}

health_check_custom_config {
failure_threshold = 1
}
}`

Also, for Temporal services i am getting this error Unable to start server. Error: could not build arguments for function "go.uber.org/fx".(*App).constructCustomLogger.func2 (/go/pkg/mod/go.uber.org/fx@v1.17.1/app.go:415): failed to build fxevent.Logger: could not build arguments for function "go.temporal.io/server/temporal".glob..func8 (/home/builder/temporal/temporal/fx.go:921): failed to build log.Logger: received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider (/home/builder/temporal/temporal/fx.go:163): sql schema version compatibility check failed: pq: no pg_hba.conf entry for host "172.20.21.107", user "db_admin", database "temporal", no encryption

I am using postgresql version 15.4

I will be very happy to provide more details about the terraform code i am using to deploy the services ( ecs, rds, ...) on AWS

If some one can help me with these issues it would be much appreciated :pray:
Thank you in advance

Update:

I was able to get my Retool application working but i am still facing this error Unable to start server. Error: could not build arguments for function "go.uber.org/fx".(*App).constructCustomLogger.func2 (/go/pkg/mod/go.uber.org/fx@v1.17.1/app.go:415): failed to build fxevent.Logger: could not build arguments for function "go.temporal.io/server/temporal".glob..func8 (/home/builder/temporal/temporal/fx.go:921): failed to build log.Logger: received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider (/home/builder/temporal/temporal/fx.go:163): sql schema version compatibility check failed: pq: no pg_hba.conf entry for host "172.20.21.107", user "db_admin", database "temporal", no encryption when bringing up my Temporal services (frondend, worker, matching, history).

I am wondering if i should explicitly specify some environment variable related to my temporal rds database to fix this error.
Note that i am using tryretool/one-offs:retool-temporal-1.1.2 image to create my ecs temporal services

Hi @victoria

Can i get your help here please ?
Thank you :pray:

Update:
I fixed the connection issue to temporal database by downgrading postgresql version to 14.5