| page_title | spiceai Provider |
|---|---|
| description | The Spice.ai provider allows you to manage Spice.ai Cloud resources. Authentication The provider uses OAuth client credentials for authentication. You can obtain these from the Spice.ai Cloud portal. Credentials can be provided via: Provider configuration blockEnvironment variables (recommended for CI/CD) Example Usage provider "spiceai" { # Credentials can also be set via environment variables: # SPICEAI_CLIENT_ID and SPICEAI_CLIENT_SECRET client_id = var.spiceai_client_id client_secret = var.spiceai_client_secret } |
The Spice.ai provider allows you to manage Spice.ai Cloud resources.
The provider uses OAuth client credentials for authentication. You can obtain these from the Spice.ai Cloud portal.
Credentials can be provided via:
- Provider configuration block
- Environment variables (recommended for CI/CD)
provider "spiceai" {
# Credentials can also be set via environment variables:
# SPICEAI_CLIENT_ID and SPICEAI_CLIENT_SECRET
client_id = var.spiceai_client_id
client_secret = var.spiceai_client_secret
}# Configure the Spice.ai provider
terraform {
required_providers {
spiceai = {
source = "spiceai/spiceai"
version = "~> 0.1"
}
}
}
# Provider configuration using variables
provider "spiceai" {
# OAuth client credentials for authentication
# These can also be set via environment variables:
# SPICEAI_CLIENT_ID
# SPICEAI_CLIENT_SECRET
client_id = var.spiceai_client_id
client_secret = var.spiceai_client_secret
# Optional: Custom API endpoint (defaults to https://api.spice.ai)
# api_endpoint = "https://api.spice.ai"
# Optional: Custom OAuth endpoint (defaults to https://spice.ai/api/oauth/token)
# oauth_endpoint = "https://spice.ai/api/oauth/token"
}
# Variables for credentials
variable "spiceai_client_id" {
description = "OAuth client ID for Spice.ai API authentication"
type = string
sensitive = true
}
variable "spiceai_client_secret" {
description = "OAuth client secret for Spice.ai API authentication"
type = string
sensitive = true
}
# Alternative: Provider configuration using environment variables only
# provider "spiceai" {
# # Credentials are automatically read from:
# # - SPICEAI_CLIENT_ID
# # - SPICEAI_CLIENT_SECRET
# }api_endpoint(String) The Spice.ai API endpoint. Defaults tohttps://api.spice.ai. Can also be set via theSPICEAI_API_ENDPOINTenvironment variable.client_id(String) The OAuth client ID for Spice.ai API authentication. Can also be set via theSPICEAI_CLIENT_IDenvironment variable.client_secret(String, Sensitive) The OAuth client secret for Spice.ai API authentication. Can also be set via theSPICEAI_CLIENT_SECRETenvironment variable.oauth_endpoint(String) The Spice.ai OAuth token endpoint. Defaults tohttps://spice.ai/api/oauth/token. Can also be set via theSPICEAI_OAUTH_ENDPOINTenvironment variable.vercel_protection_bypass(String, Sensitive) Optional bypass token for Vercel deployment protection. When set, adds thex-vercel-protection-bypassheader to API requests. Can also be set via theSPICEAI_VERCEL_PROTECTION_BYPASSenvironment variable.