streamtime_flink_project (Resource)
A Flink project: the home of a Flink application’s uploaded versions, which Flink instances and jobs run. Creating one returns a key your CI system uses to upload versions to it.
Example Usage
# A Flink project with its own artifact store. Your CI system uploads versions to it
# with the project's CI key, which you create when you set up CI (the project page, or
# `streamtime flink-project rotate-key etl`). Terraform does not manage the key.
resource "streamtime_flink_project" "etl" {
identifier = "etl"
name = "ETL jobs"
runtime = "java"
cluster = streamtime_flink.shared.identifier # a Job Workspace
flink_unit_budget = 2
metadata = jsonencode({
entry_class = "com.acme.etl.Main"
labels = { team = "data" }
})
store = {
store_type = "oras"
url = "https://ghcr.io"
authentication = "token"
# A read-only, expiring token limited to this project's artifacts.
token = var.ghcr_read_token
}
}
variable "ghcr_read_token" {
type = string
sensitive = true
}
Schema
Required
cluster(String) Identifier of the Flink job workspace (a streamtime_flink with mode = session) the project’s Flink units are booked on.flink_unit_budget(Number) Flink units the project may use on its job workspace, booked from the workspace’s capacity.identifier(String) Unique name of the project: up to 24 lowercase letters, digits and dashes. Changing it creates a new project.name(String) Display name of the project.
Optional
description(String) Free-text description.metadata(String) Project defaults and labels, as a JSON object set with jsonencode(): entry_class (the default main class of a JAR), default_args, labels and documentation_url. Values Streamtime fills in are not shown as changes.runtime(String) Language of the application: java, scala or python. It decides which artifacts the project accepts. Changing it creates a new project.store(Attributes) Your own artifact store for the project’s releases. Removing it disconnects the store; registered releases stay listed but cannot be pulled until a store is connected again. (see below for nested schema)
Read-Only
artifact_kind(String) Kind of artifact the project accepts, from its runtime.build_tool(String) Tool your CI pipeline builds the artifact with, chosen from the runtime: Maven for java, sbt for scala, pip for python.id(String) Same as identifier. Use the identifier to import.latest_version(String) Most recently uploaded version, if any.
Nested Schema for store
Required:
store_type(String) Kind of store: oras (an OCI registry) or jfrog.url(String) The store’s https address, for example https://ghcr.io.
Optional:
authentication(String) How Flink instances sign in to the store: none (the default), basic or token.ca_certificate(String) CA certificate (PEM) to trust when the store does not use a public certificate.password(String, Sensitive) Password, for basic sign-in. Use a read-only, expiring credential limited to this project’s artifacts. Streamtime never returns it.token(String, Sensitive) Access token, for token sign-in. Use a read-only, expiring token limited to this project’s artifacts. Streamtime never returns it.username(String, Sensitive) Username, for basic sign-in. Streamtime never returns it, so a change made outside Terraform is not shown.
Read-Only:
has_credential(Boolean) Whether Streamtime holds a credential for the store.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Import by identifier. The CI key is not imported: Streamtime returns it only at creation.
terraform import streamtime_flink_project.etl etl