https://github.com/labd/terraform-provider-voyado
https://github.com/labd/terraform-provider-voyado
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/labd/terraform-provider-voyado
- Owner: labd
- License: mpl-2.0
- Created: 2026-04-16T09:38:37.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-08T12:31:07.000Z (about 2 months ago)
- Last Synced: 2026-05-08T14:28:11.348Z (about 2 months ago)
- Language: Go
- Size: 6.12 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# terraform-provider-voyado
Terraform provider for [Voyado Engage](https://developer.voyado.com/docs/api/the-engage-api) — currently the [`voyado_interaction_schema`](https://developer.voyado.com/docs/loyalty/interactions#the-interactionschemas-endpoint) resource, which maps to Engage API v3:
- `POST /api/v3/interactionschemas`
- `GET /api/v3/interactionschemas/{interactionSchemaId}`
- `DELETE /api/v3/interactionschemas/{interactionSchemaId}`
## Requirements
- [Go](https://go.dev/dl/) 1.26 or newer (see `go.mod`)
## Provider configuration
| Argument | Description |
|-------------|-------------|
| `api_url` | Base URL of the Engage API (for example `https://mytenant.voyado.com` or `https://mytenant.staging.voyado.com`). |
| `api_key` | Engage API key (sent as the `apikey` header). |
| `user_agent`| Optional. Override the default `User-Agent` (Voyado recommends a descriptive value). |
## Resource: `voyado_interaction_schema`
| Attribute | Description |
|----------------|-------------|
| `schema_id` | Unique schema id (`id` in the API). |
| `display_name` | `displayName` in the API. |
| `json_schema` | JSON object as a string, sent as `jsonSchema` (see Voyado’s interaction schema rules). |
| `id` | Computed; same as `schema_id`. |
Engage does not support updating a schema in place. Changing `schema_id`, `display_name`, or `json_schema` forces replacement (delete then create). Deleting a schema removes all interactions for that schema.
### Example
```hcl
terraform {
required_providers {
voyado = {
source = "labd/voyado"
}
}
}
provider "voyado" {
api_url = "https://mytenant.staging.voyado.com"
api_key = var.engage_api_key
}
resource "voyado_interaction_schema" "reuse" {
schema_id = "Reuse-Spring-2023"
display_name = "Reuse Spring Sale"
json_schema = jsonencode({
"$schema" = "https://json-schema.org/draft/2020-12/schema"
type = "object"
properties = {
name = {
type = "string"
displayName = "Name"
showInContactCard = "true"
sortOrder = "0"
}
}
required = ["name"]
})
}
```
Import an existing schema by id:
```bash
terraform import voyado_interaction_schema.reuse Reuse-Spring-2023
```