DBT connection error from CLI to postgres server in cloud .

The problem I’m having

I am not able to connect with the postgres server in cloud from the dbt CLI .The request from my CLI is not even reaching the server.I get connection timeout expired error message.

The context of why I’m trying to do this

I want to create a sample dbt project import table from postgres and deploy the project from dbt to lightdash for visualization.

What I’ve already tried

I checked the profiles.yml file . I have given the correct credentials .

Some example code or error messages

 dbt debug
10:08:33  Running with dbt=1.5.2
10:08:33  dbt version: 1.5.2
10:08:33  python version: 3.11.4
10:08:33  python path: /Library/Frameworks/Python.framework/Versions/3.11/bin/python3
10:08:33  os info: macOS-13.4-arm64-arm-64bit
10:08:33  Using profiles.yml file at /Users/abc/.dbt/profiles.yml
10:08:33  Using dbt_project.yml file at /Users/abc/jaffle_shop/dbt_project.yml
10:08:33  Configuration:
10:08:33    profiles.yml file [OK found and valid]
10:08:33    dbt_project.yml file [OK found and valid]
10:08:33  Required dependencies:
10:08:33   - git [OK found]

10:08:33  Connection:
10:08:33    host:
10:08:33    port:1234
10:08:33    user:sample
10:08:33    database:sample
10:08:33    schema: public
10:08:33    search_path: None
10:08:33    keepalives_idle: 0
10:08:33    sslmode: require
10:08:33  Registered adapter: postgres=1.5.2
10:09:33    Connection test: [ERROR]

10:09:33  1 check failed:
10:09:33  dbt was unable to connect to the specified database.
The database returned the following error:

  >Database Error
  connection to server at "", port 1234 failed: timeout expired

Check your database credentials and try again. For more information, visit: