onehouse_transformer_jar
Manages a custom transformer JAR registered from an object-storage location (S3 or GCS). Onehouse copies the uploaded JAR to its own managed storage location and references it by name for use in custom transformations.
This page documents Terraform-specific behavior (HCL syntax, types, mutability, drift, import). For full parameter semantics and valid values, see UPLOAD JAR, REPLACE JAR, DESCRIBE JAR, and DELETE JAR.
Example Usage
S3
resource "onehouse_transformer_jar" "example" {
name = "my-transformer.jar"
cloud = "s3"
path = "s3://my-bucket/jars/my-transformer.jar"
source_version = "1"
}
GCS
resource "onehouse_transformer_jar" "example_gcs" {
name = "gcs-transformer.jar"
cloud = "gcs"
path = "gs://my-bucket/jars/gcs-transformer.jar"
source_version = "1"
}
Re-uploading a new JAR build
Editing path alone does nothing — it is write-only and invisible to Terraform. To re-upload (issuing a REPLACE JAR), point path at the new location and bump source_version:
resource "onehouse_transformer_jar" "example" {
name = "my-transformer.jar"
cloud = "s3"
path = "s3://my-bucket/jars/my-transformer-v2.jar"
source_version = "2" # bumped from "1" -> triggers REPLACE JAR
}
Argument Reference
| Argument | Type | Required | Mutability | Description |
|---|---|---|---|---|
name | string | ✅ | Immutable (ForceNew) | JAR name. Lookup key. |
cloud | string | ✅ | Immutable (ForceNew) | Object-storage cloud. One of s3 or gcs. Selects the s3.path / gcs.path upload option and must match the scheme of path. |
path | string | ✅ | Write-only | Source URI of the JAR to upload — s3://… (cloud s3) or gs://… (cloud gcs). Write-only: read from config on create/replace, never stored in state. Onehouse copies the JAR to a managed location (see jar_path) and does not echo the source URI back. Because it is not in state, editing path alone does not trigger a re-upload — bump source_version. |
source_version | string | Mutable | Opaque trigger. Change this value (any string) to force a REPLACE JAR from the current path. Leave unset if you never need to re-upload. |
Attribute Reference
| Attribute | Type | Description |
|---|---|---|
id | string | Resource identifier (equals name). |
uid | string | Server-assigned JAR entry UID. |
version | string | Active version of the JAR as tracked by Onehouse. |
jar_path | string | Onehouse-managed storage location the JAR was copied to — distinct from the source path. |
Import
terraform import onehouse_transformer_jar.example my-transformer.jar
Import is drift-free: name, uid, version, jar_path, and cloud are recovered from the server, and path is write-only (never compared). Supply name, cloud, and path in your .tf file; leave source_version unset unless you want to immediately re-upload.
Data Source
data "onehouse_transformer_jar" "lookup" {
name = "my-transformer.jar"
}
output "jar_storage_location" {
value = data.onehouse_transformer_jar.lookup.jar_path
}
The data source exposes id, uid, version, jar_path, and cloud (it does not have a source path).
Limitations
- Write-only
path. The source URI is never stored in state and does not appear interraform show/plan output. Editingpathalone is a no-op — bumpsource_versionto re-upload. - Source path not recoverable. The server stores the JAR at a managed location (
jar_path) and discards the original source URI, sopathcannot be read back (this is why it is write-only and import is diff-free). - Delete is blocked by usage.
DELETE JARfails if any Flow still uses the JAR; remove it from transformations/Flows first.