Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.16 KB

File metadata and controls

46 lines (35 loc) · 1.16 KB
page_title spiceai_api_keys Data Source - spiceai
subcategory
description Retrieves the API keys for a Spice.ai app. Each app has two API keys to support key rotation.

spiceai_api_keys (Data Source)

Retrieves the API keys for a Spice.ai app. Each app has two API keys to support key rotation.

Example Usage

# Get API keys for an app
data "spiceai_api_keys" "example" {
  app_id = spiceai_app.example.id
}

# Use the primary API key
output "primary_api_key" {
  description = "The primary API key for the app"
  value       = data.spiceai_api_keys.example.api_key
  sensitive   = true
}

# Use the secondary API key (useful for key rotation)
output "secondary_api_key" {
  description = "The secondary API key for the app"
  value       = data.spiceai_api_keys.example.api_key_2
  sensitive   = true
}

Schema

Required

  • app_id (String) The unique identifier of the app.

Read-Only

  • api_key (String, Sensitive) The primary API key for the app.
  • api_key_2 (String, Sensitive) The secondary API key for the app.