runr_workflow_app (Resource)
The workflow app of a project (or of one of its environments): where the workflow engine calls the workflows' code (workflows). By default that is the project's function; endpoint_url points the engine at a function served outside RunR instead, which verifies the engine's calls with the app's signing key (RUNR_WORKFLOW_SIGNING_KEY, from runr workflows app signing-key). Rotating the key is an action (runr workflows app rotate-key), not configuration.
Destroying the resource goes back to the project's function. Needs workflows.manage. Import with <project name or id> or <project name or id>/<environment>.
Example Usage#
# The workflows of the staging environment run in a function served outside RunR; it verifies
# the engine's calls with RUNR_WORKFLOW_SIGNING_KEY (`runr workflows app signing-key --env staging`).
resource "runr_workflow_app" "staging" {
project_id = runr_project.orders.id
environment = "staging"
endpoint_url = "https://workflows-staging.example.com/runr"
}
Schema#
Required#
project_id(String) Project id.
Optional#
endpoint_url(String) URL the engine calls instead of the project's function (a public http or https address). Left out: the project's function; an override set outside Terraform is then removed.environment(String) The project environment (name or id). Left out: the project's own workload (production).
Read-Only#
id(String)<project_id>or<project_id>/<environment>.key_fingerprint(String) Fingerprint of the current signing key (changes when the key is rotated).url(String) The URL the engine calls:endpoint_url, else the function's URL.
Import#
Import is supported using the following syntax:
The terraform import command can be used, for example:
# <project name or id> (the project's own workload) or <project name or id>/<environment>
terraform import runr_workflow_app.orders orders-api
terraform import runr_workflow_app.staging orders-api/staging