Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .copywrite.hcl
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# NOTE: This file is for HashiCorp specific licensing automation and can be deleted after creating a new repo with this template.
schema_version = 1

project {
license = "MPL-2.0"
copyright_year = 2021
copyright_year = 2025

header_ignore = [
# internal catalog metadata (prose)
Expand All @@ -21,4 +20,4 @@ project {
# GoReleaser tooling configuration
".goreleaser.yml",
]
}
}
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

5 changes: 0 additions & 5 deletions .github/CODE_OF_CONDUCT.md

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/issue-comment-triage.yml

This file was deleted.

375 changes: 0 additions & 375 deletions LICENSE

This file was deleted.

6 changes: 3 additions & 3 deletions META.d/_summary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schema: 1.1
partition: tf-ecosystem

summary:
owner: team-tf-core-plugins
owner: spiceai
description: |
Quick start repository for creating a Terraform provider using terraform-plugin-framework
visibility: public
Terraform provider for managing Spice.ai resources including apps, configurations, and deployments
visibility: public
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Makefile for terraform-provider-spiceai

default: build

BINARY_NAME=terraform-provider-spiceai
VERSION?=dev
GOOS?=$(shell go env GOOS)
Expand All @@ -12,7 +14,7 @@ LDFLAGS=-ldflags "-X main.version=$(VERSION)"
PROJECT_DIR=$(shell pwd)
TEST_DIR=$(PROJECT_DIR)/examples/test

.PHONY: all build clean test testacc fmt vet lint install setup plan apply destroy help
.PHONY: all build clean test testacc fmt vet lint install setup plan apply destroy help generate

# Default target
all: build
Expand Down Expand Up @@ -103,7 +105,11 @@ clean:
rm -f $(TEST_DIR)/terraform.tfstate.backup
@echo "Clean complete"

## Documentation
## Documentation and Code Generation

generate:
@echo "Running code generation..."
cd tools && go generate ./...

docs:
@echo "Generating documentation..."
Expand Down Expand Up @@ -138,6 +144,10 @@ help:
@echo " make vet - Run go vet"
@echo " make lint - Run linter"
@echo ""
@echo "Code Generation:"
@echo " make generate - Run all code generation (docs, formatting, headers)"
@echo " make docs - Generate provider documentation only"
@echo ""
@echo "Development:"
@echo " make setup - Set up ~/.terraformrc with dev_overrides"
@echo " make plan - Build and run terraform plan"
Expand All @@ -148,10 +158,9 @@ help:
@echo " make clean - Clean build artifacts and state files"
@echo ""
@echo "Other:"
@echo " make docs - Generate provider documentation"
@echo " make deps - Download dependencies"
@echo " make tidy - Tidy dependencies"
@echo ""
@echo "Environment variables for plan/apply/destroy:"
@echo " SPICEAI_CLIENT_ID - OAuth client ID"
@echo " SPICEAI_CLIENT_SECRET - OAuth client secret"
@echo " SPICEAI_CLIENT_SECRET - OAuth client secret"
57 changes: 57 additions & 0 deletions docs/data-sources/app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "spiceai_app Data Source - spiceai"
subcategory: ""
description: |-
Retrieves details about a Spice.ai app by its ID.
---

# spiceai_app (Data Source)

Retrieves details about a Spice.ai app by its ID.

## Example Usage

```terraform
data "spiceai_app" "example" {
id = "12345"
}

output "app_name" {
value = data.spiceai_app.example.name
}

output "app_api_key" {
value = data.spiceai_app.example.api_key
sensitive = true
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) The unique identifier of the app.

### Read-Only

- `api_key` (String, Sensitive) The API key for the app.
- `config` (Attributes) The configuration of the app. (see [below for nested schema](#nestedatt--config))
- `created_at` (String) The timestamp when the app was created.
- `description` (String) A description of the app.
- `name` (String) The name of the app.
- `production_branch` (String) The production branch for the app.
- `region` (String) The region where the app is deployed.
- `visibility` (String) The visibility of the app (public or private).

<a id="nestedatt--config"></a>
### Nested Schema for `config`

Read-Only:

- `image_tag` (String) The Spice.ai runtime image tag.
- `node_group` (String) The node group for the app.
- `replicas` (Number) The number of replicas.
- `spicepod` (String) The spicepod configuration as a JSON string.
- `storage_claim_size_gb` (Number) The storage claim size in GB.
54 changes: 54 additions & 0 deletions docs/data-sources/apps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "spiceai_apps Data Source - spiceai"
subcategory: ""
description: |-
Retrieves a list of all Spice.ai apps in the authenticated organization.
---

# spiceai_apps (Data Source)

Retrieves a list of all Spice.ai apps in the authenticated organization.

## Example Usage

```terraform
data "spiceai_apps" "all" {}

output "all_app_names" {
value = [for app in data.spiceai_apps.all.apps : app.name]
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `apps` (Attributes List) List of apps. (see [below for nested schema](#nestedatt--apps))

<a id="nestedatt--apps"></a>
### Nested Schema for `apps`

Read-Only:

- `api_key` (String, Sensitive) The API key for the app.
- `config` (Attributes) The configuration of the app. (see [below for nested schema](#nestedatt--apps--config))
- `created_at` (String) The timestamp when the app was created.
- `description` (String) A description of the app.
- `id` (String) The unique identifier of the app.
- `name` (String) The name of the app.
- `production_branch` (String) The production branch for the app.
- `region` (String) The region where the app is deployed.
- `visibility` (String) The visibility of the app (public or private).

<a id="nestedatt--apps--config"></a>
### Nested Schema for `apps.config`

Read-Only:

- `image_tag` (String) The Spice.ai runtime image tag.
- `node_group` (String) The node group for the app.
- `replicas` (Number) The number of replicas.
- `spicepod` (String) The spicepod configuration as a JSON string.
- `storage_claim_size_gb` (Number) The storage claim size in GB.
30 changes: 0 additions & 30 deletions docs/data-sources/example.md

This file was deleted.

30 changes: 0 additions & 30 deletions docs/ephemeral-resources/example.md

This file was deleted.

25 changes: 0 additions & 25 deletions docs/functions/example.md

This file was deleted.

27 changes: 20 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "scaffolding Provider"
page_title: "spiceai Provider"
description: |-

The Spice.ai provider allows you to manage Spice.ai resources such as apps and deployments.
---

# scaffolding Provider

# spiceai Provider

The Spice.ai provider allows you to manage Spice.ai resources such as apps and deployments.

## Example Usage

```terraform
provider "scaffolding" {
# example configuration here
provider "spiceai" {
# OAuth client credentials for Spice.ai API authentication
# These can also be set via environment variables:
# SPICEAI_CLIENT_ID
# SPICEAI_CLIENT_SECRET

# client_id = "your-client-id"
# client_secret = "your-client-secret"

# Optional: Override API endpoints (defaults shown)
# api_endpoint = "https://api.spice.ai"
# oauth_endpoint = "https://spice.ai/api/oauth/token"
}
```

Expand All @@ -22,4 +32,7 @@ provider "scaffolding" {

### Optional

- `endpoint` (String) Example provider attribute
- `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.
Loading