Skip to main content
This article shows how the Cognite Toolkit deploys configurations to a Cognite Data Fusion (CDF) project. Data engineers and Cognite Toolkit administrators use it to preview a change, apply it, and delete the deployed resources. Before you start, authenticate and keep a .env file in the directory where you run the Cognite Toolkit. See Authenticating with the Cognite Toolkit.
1

Create the workflow configuration

cdf deploy reads the build/ directory. That path is the default, and cdf build normally creates it from your modules. In this example you create it by hand so you can see the files the command sends to CDF.Create build/workflows/my.Workflow.yaml:
my.Workflow.yaml
The directory looks like this:
The directory name workflows and the suffix .Workflow.yaml tell the Cognite Toolkit which API to call. This file creates the workflow resource. A workflow that runs tasks also needs a workflow version file. The resource library lists every supported resource.
2

Preview the deployment

Run a dry run before you change the CDF project. --verbose prints each resource identifier.
build/ is optional because it is the default. The command asks you to type the CDF project name, and that name must match CDF_PROJECT in your environment. Cognite Toolkit commands that can change a project use this check. Pass the project on the command line to skip the prompt: cdf deploy build/ --cdf-project my_demo --dry-run --verbose.The output depends on your project and Cognite Toolkit version. This example uses project my_demo:
Verify project
The plan lists the target project, the Cognite Toolkit version, and the files in build/. One workflow finishes almost immediately.
Plan and execution
The summary reports what the command would change. Because this is a dry run, the project is still unchanged.
Deploy results
The dry run would create one workflow. --verbose names that workflow myWorkflow. Able to deploy: Yes means your credentials can write the workflow to CDF.
3

Deploy the workflow

Run the same command without --dry-run:
The setup and plan match the dry run. The summary reports one created workflow, myWorkflow. The Cognite Toolkit created it with POST /workflows. See the Workflows API.
4

Deploy the workflow again

Run the same command a second time. The summary lists myWorkflow as unchanged. The Cognite Toolkit reads the workflow from CDF and compares it with my.Workflow.yaml. When the file matches the project, it does not send an update.
5

Update the workflow

Edit my.Workflow.yaml:
my.Workflow.yaml
Preview the change:
--verbose prints the description change:
Description diff
The dry run reports one update to myWorkflow and Able to deploy: Yes. The CDF project is still unchanged. Run the command again without --dry-run to apply the new description.
6

Delete the workflow

cdf clean deletes the resources listed in build/ from the CDF project. Run the dry run and read the plan before you omit --dry-run.
cdf clean deletes the resources listed in build/. Preview the deletion:
The dry run lists myWorkflow under Would delete and Able to clean: Yes. Run the command without --dry-run to delete it. The summary then reports one deleted workflow.

Next steps

cdf build creates the build/ directory from modules, including the variable substitution this example skipped. See Building configurations. The resource library lists every file name the Cognite Toolkit can deploy.
Last modified on November 2, 2026