Skip to content

Can't create a postgres data source #2

@chelomontilla

Description

@chelomontilla

Hello,
I'm trying to create a new datasource of type "pg" (Postgres) but I always get the following error:

│ Error: 400 from POST request to https://localhost:8080/api/data_sources: {"message": "The browser (or proxy) sent a request that this server could not understand."}
│ 
│   with module.redash_config.redash_data_source.test,
│   on ../../modules/redash_config/datasources.tf line 2, in resource "redash_data_source" "test":
│    2: resource "redash_data_source" "test" {
│ 
╵

The configuration for the datasource is:

resource "redash_data_source" "test" {
  name = "test"
  type = "pg"

  options {
    host     = "test.com"
    port     = 5432
    dbname   = "test"
    user     = "u_redash"
    password = "123456"
  }
}

If I try to send same configuration to the api directly it works:

{
    "name": "test",
    "type": "pg",
    "options": {
        "dbname": "test",
        "host": "test.com",
        "user": "u_redash",
        "password": "123456",
        "port": 5432
    }
}

I'm not sure what is the problem. Is there anyway to test and see what request the provider is sending to the API? I'm happy to help with the provider :)
The redash version I'm using is v10.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions