The Starburst Galaxy Terraform provider allows you to programatically manage your Galaxy infrastructure objects, or resources in Terraform, as human-readable code. With the Galaxy Terraform provider, you can automate the creation and management of resources such as:
The Galaxy Terraform provider enables easier version control of infrastructure and helps maintains consistency across environments. It also allows for easy replication of configurations.
Before you begin using the Galaxy Terraform provider, you must have the following prerequisites:
The Galaxy Terraform provider is available in the Terraform registry. To use it, add the following to your Terraform configuration file:
terraform {
required_providers {
galaxy = {
source = "hashicorp.com/starburstdata/galaxy"
version = "~> 1.0"
}
}
}
Then run terraform init.
1. Set the following values as environment variables:
export GALAXY_CLIENT_ID="your-client-id"
export GALAXY_CLIENT_SECRET="your-client-secret"
export GALAXY_DOMAIN="https://your-galaxy-domain.starburstdata.com"
2. Add the following line to your Terraform configuration file:
provider "galaxy" {
# Configuration is read from environment variables
}
resource "galaxy_cluster" "example" {
name = "my-cluster"
cloud_region_id = "your-region-id"
min_workers = 1
max_workers = 10
private_link_cluster = false
catalog_refs = []
processing_mode = "WarpSpeed"
warp_resiliency_enabled = true
result_cache_enabled = true
idle_stop_minutes = 30
}
resource "galaxy_s3_catalog" "data_lake" {
name = "data-lake"
cloud_region_id = "your-region-id"
s3_catalog_properties = {
bucket_name = "my-data-bucket"
default_location = "s3://my-data-bucket/data"
region = "us-east-1"
aws_access_key_id = var.aws_access_key
aws_secret_access_key = var.aws_secret_key
}
cluster_id = galaxy_cluster.example.id
}
For more Galaxy Terraform provider configuration examples, see Examples.
To learn more about the basics of Terraform configuration, see the Terraform Language documentation.
Is the information on this page helpful?
Yes
No