Skip to content

Latest commit

 

History

History
102 lines (83 loc) · 3.43 KB

File metadata and controls

102 lines (83 loc) · 3.43 KB
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 }

spiceai Provider

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 block
  • Environment 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
}

Example Usage

# 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
# }

Schema

Optional

  • api_endpoint (String) The Spice.ai API endpoint. Defaults to https://api.spice.ai. Can also be set via the SPICEAI_API_ENDPOINT environment variable.
  • client_id (String) The OAuth client ID for Spice.ai API authentication. Can also be set via the SPICEAI_CLIENT_ID environment variable.
  • client_secret (String, Sensitive) The OAuth client secret for Spice.ai API authentication. Can also be set via the SPICEAI_CLIENT_SECRET environment variable.
  • oauth_endpoint (String) The Spice.ai OAuth token endpoint. Defaults to https://spice.ai/api/oauth/token. Can also be set via the SPICEAI_OAUTH_ENDPOINT environment variable.
  • vercel_protection_bypass (String, Sensitive) Optional bypass token for Vercel deployment protection. When set, adds the x-vercel-protection-bypass header to API requests. Can also be set via the SPICEAI_VERCEL_PROTECTION_BYPASS environment variable.