Skip to main content

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.

Canonical reference

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

ArgumentTypeRequiredMutabilityDescription
namestringImmutable (ForceNew)JAR name. Lookup key.
cloudstringImmutable (ForceNew)Object-storage cloud. One of s3 or gcs. Selects the s3.path / gcs.path upload option and must match the scheme of path.
pathstringWrite-onlySource 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_versionstringMutableOpaque 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

AttributeTypeDescription
idstringResource identifier (equals name).
uidstringServer-assigned JAR entry UID.
versionstringActive version of the JAR as tracked by Onehouse.
jar_pathstringOnehouse-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 in terraform show/plan output. Editing path alone is a no-op — bump source_version to re-upload.
  • Source path not recoverable. The server stores the JAR at a managed location (jar_path) and discards the original source URI, so path cannot be read back (this is why it is write-only and import is diff-free).
  • Delete is blocked by usage. DELETE JAR fails if any Flow still uses the JAR; remove it from transformations/Flows first.