https://github.com/winebarrel/terraform-provider-redash
Terraform provider for Redash.
https://github.com/winebarrel/terraform-provider-redash
golang redash terraform
Last synced: 3 months ago
JSON representation
Terraform provider for Redash.
- Host: GitHub
- URL: https://github.com/winebarrel/terraform-provider-redash
- Owner: winebarrel
- License: mit
- Created: 2023-02-26T02:09:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-17T01:33:48.000Z (3 months ago)
- Last Synced: 2025-04-17T15:12:44.803Z (3 months ago)
- Topics: golang, redash, terraform
- Language: Go
- Homepage: https://registry.terraform.io/providers/winebarrel/redash
- Size: 332 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-provider-redash
[](https://github.com/winebarrel/terraform-provider-redash/actions/workflows/ci.yml)
[](https://registry.terraform.io/providers/winebarrel/redash/latest/docs)Terraform provider for [Redash](https://redash.io/).
## Usage
```tf
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"
}
```## Tests
```sh
docker compose up -d
make redash-setup
make testacc
```## Run a development binary
```sh
docker compose up -d
make redash-setup
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## Related Links
* https://github.com/winebarrel/redash-go