Terraform Provider
The Terraform Provider for Quali's Jarvis is a plugin for Terraform that allows you to interact with Jarvis and control Jarvis behavior and presentation. The terraform provider is developed as a open source project that relies on Jarvis public APIs.
- Jarvis open-source provider code: https://github.com/QualiTorque/terraform-provider-torque
- The Jarvis provider in the Terraform registry: https://registry.terraform.io/providers/QualiTorque/torque/latest
- Jarvis provider documentation: https://registry.terraform.io/providers/QualiTorque/torque/latest/docs
To install this provider, copy and paste this code into your Terraform configuration. Then, run terraform init.
terraform {
required_providers {
torque = {
source = "QualiTorque/torque"
# version = "0.0.2"
}
}
}
provider "torque" {
# Configuration options
}
Example use for the Jarvis Terraform provider
Many of our customers are automating Infrastructure that is not necessarily created as part of the environment orchestration. In such situations, the Jarvis Terraform provider can help with representation on the required resources in the resource catalog for users ease-of-use. Here is a code snippet from a terraform module that will generate a "torque_introspection_resource" resource - that will be recognized and presented by Jarvis so end-users of the environment will be able to see it in the Jarvis UI or use it in automation using the Jarvis API.
resource "torque_introspection_resource" "example" {
display_name = "My Resource"
image = "https://portal.qtorque.io/static/media/networking.dc1b7fb73182de0136d059a1eb00af4f.svg"
introspection_data = {size = "large", mode = "party"}
}
The complete terraform example can be found here: https://github.com/QualiTorque/terraform-provider-torque/blob/main/examples/provider-install-verification/main.tf
Once deployed, Jarvis will represent the "torque_introspection_resource" resource in the resource catalog.
