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 key.
resource "streamtime_flink_project" "etl" {
identifier = "etl"
name = "ETL jobs"
runtime = "java"
source_provider = "github"
source_url = "https://github.com/acme/etl"
source_branch = "main"
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
}
# Returned only when the project is created. Store it as a secret in your CI system.
output "etl_ci_key" {
value = streamtime_flink_project.etl.ci_api_key
sensitive = true
}
Schema
Required
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
build_tool(String) Tool your CI pipeline builds the artifact with, used to tailor the CI template.cluster(String) Identifier of the Flink job workspace (a streamtime_flink with mode = session) the project’s Flink units are booked on.description(String) Free-text description.flink_unit_budget(Number) Flink units the project may use on its job workspace, booked from the workspace’s capacity.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.source_branch(String) Branch your CI pipeline builds from.source_provider(String) Where the source code is hosted: github, gitlab, bitbucket, other or none.source_url(String) Address of the source repository, for your records.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.ci_api_key(String, Sensitive) Key your CI system uses to upload versions to this project, and only to it. Streamtime returns it only when the project is created, so it is empty after an import. Store it as a secret in your CI system.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