Terraform provider for Spacelift Flows.
The provider is published to the Terraform and OpenTofu registries. Add it to your TF configuration:
terraform {
required_providers {
flows = {
source = "spacelift-io/flows"
}
}
}
provider "flows" {
endpoint = "https://useflows.eu" # or https://useflows.us
}Set the FLOWS_TOKEN environment variable for authentication:
export FLOWS_TOKEN=$(flowctl auth token)The provider supports managing flows as code and entity lifecycle confirmations.
resource "flows_flow" "example" {
project_id = "your-project-id"
name = "my-flow"
definition = file("${path.module}/flow.yaml")
app_installation_mapping = {
my_app = "app-installation-id"
}
}
resource "flows_entity_lifecycle_confirmation" "example" {
entity_id = flows_flow.example.blocks["my_entity"].id
}See the examples directory for more usage examples.