Terraform provider for Redash.
terraform {
required_providers {
redash = {
source = "winebarrel/redash"
}
}
}
provider "redash" {
url = "http://localhost:5001" # default: $REDASH_URL
api_key = "..." # default: $REDASH_API_KEY
}
resource "redash_data_source" "postgres" {
name = "postgres"
type = "pg"
# see https://github.com/getredash/redash/blob/v25.1/redash/query_runner/pg.py#L149-L153
options = jsonencode({
dbname = "postgres"
host = "postgres"
port = 5432
user = "postgres"
})
}
resource "redash_query" "select_one" {
data_source_id = redash_data_source.postgres.id
name = "select one"
query = "select 1"
}
docker compose up -d
make redash-setup
make redash-upgrade-db
make testacc
docker compose up -d
make redash-setup
make redash-upgrade-db
cp etc/redash.tf.sample redash.tf
make tf-plan
make tf-apply
NOTE:
- local Redash URL: http://localhost:5001
- email:
[email protected]
- password:
password
- mail server URL: http://localhost:10081