You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/resources/deployment.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,9 @@ subcategory: ""
5
5
description: |-
6
6
Creates a deployment for a Spice.ai app.
7
7
A deployment uses the app's current spicepod configuration and deploys it to the Spice.ai cloud infrastructure. Deployments are immutable - any changes to deployment parameters will create a new deployment.
8
+
~> Note: Deployments are append-only log entries. Removing this resource from your configuration will only remove it from Terraform state - it will NOT stop or affect the running instance. To deploy new changes, modify the configuration or triggers to create a new deployment.
8
9
Example Usage
10
+
Basic Deployment
9
11
10
12
resource "spiceai_deployment" "example" {
11
13
app_id = spiceai_app.example.id
@@ -20,6 +22,20 @@ description: |-
20
22
commit_sha = "abc123def456"
21
23
commit_message = "Deploy via Terraform"
22
24
}
25
+
26
+
Deployment with Triggers
27
+
Use triggers to force a new deployment when external values change (similar to null_resource):
28
+
29
+
resource "spiceai_deployment" "example" {
30
+
app_id = spiceai_app.example.id
31
+
32
+
# Trigger new deployment when spicepod config changes
@@ -28,8 +44,12 @@ Creates a deployment for a Spice.ai app.
28
44
29
45
A deployment uses the app's current spicepod configuration and deploys it to the Spice.ai cloud infrastructure. Deployments are immutable - any changes to deployment parameters will create a new deployment.
30
46
47
+
~> **Note:** Deployments are append-only log entries. Removing this resource from your configuration will only remove it from Terraform state - it will NOT stop or affect the running instance. To deploy new changes, modify the configuration or triggers to create a new deployment.
-`debug` (Boolean) Enable debug mode for this deployment. Changing this forces a new deployment to be created.
107
144
-`image_tag` (String) Override the Spice.ai runtime image tag for this deployment. If not specified, uses the app's configured image tag. Changing this forces a new deployment to be created.
108
145
-`replicas` (Number) Override the number of replicas for this deployment. Must be between 1 and 10. If not specified, uses the app's configured replicas. Changing this forces a new deployment to be created.
146
+
-`triggers` (Map of String) A map of arbitrary strings that, when changed, will force a new deployment to be created. Use this to trigger deployments based on external changes, such as spicepod configuration updates. Similar to `triggers` in `null_resource`.
0 commit comments