This guide explains how to create an automation using the STACKIT Automation Service API, STACKIT Portal, STACKIT CLI, or Terraform. Automations are created from predefined templates and can be configured with specific parameters.
Prepare your request: Fill in the required parameters based on the template you selected, including snapshotRetentionPolicy and backupRetentionPolicies.
Send the POST request: Execute the API call with your automation configuration.
Store the automation ID: The response will include an automationId that you’ll need for future operations.
To create an automation via STACKIT Portal follow the steps below:
On the project overview navigate to Storage —> Disk Volumes —> Automations.
Click on Create automation and go to General Information.
Enter a name for your automation and select an Automation template (e.g., “Volume Recovery Point Management”) from the dropdown list.
Under Associated Volumes, define which current and future volumes in this project the automation applies to based on your filter settings:
All: Automatically targets all volumes in your project.
Selected: Allows you to narrow down target volumes using specific labels to include or exclude.
Advanced: Provides a custom text input field for advanced label selection expressions.
Tip: Click the Show associated volumes button to preview and verify that your filters are correct and that the expected volumes are correctly targeted by the automation.
In Schedule, define the execution mode for your automation:
Manually: Trigger the automation yourself whenever needed.
Scheduled: Set a specific Start Date, Start Time, and Recurrence (e.g., Hourly, Daily, Weekly) for automatic execution.
Go to the Recovery Points section to configure labels, snapshot retention, and daily backup options:
Under Recovery Point labels, toggle Copy labels from volumes to automatically pass existing labels from the source volumes onto the recovery points, or click Add label to manually assign custom key-value pairs.
Under Snapshots, configure snapshot retention options. Enable the Snapshot retention policy toggle to automatically delete the oldest snapshot to maintain your defined limit, and set your threshold in Snapshots per volume.
Under Backups, configure daily backup retention options. Enable the Daily backup retention policy toggle to automatically create a daily backup in dedicated isolated storage using the latest snapshot when triggered. Set your preferred expiration window in Retention period (Days) (default is 14 days).
Review your configuration in the right-hand summary pane and click Order fee-based to finish.
To create a volume automation via the STACKIT CLI, use the stackit beta volume automation create command.
Terminal window
stackitbetavolumeautomationcreate\
--project-id"your-project-id"\
--name"My Daily Volume Recovery Point Creation Automation"\
--description"Creates daily recovery points (snapshots and backups)"\
CLI Command Location: Notice that the backup and snapshot retention flags are defined under stackit beta volume automation create. Use --help on this command to list all supported arguments:
Terminal window
stackitbetavolumeautomationcreate--help
You can create and manage automations using the STACKIT Terraform Provider (>= v0.117.0).
resource"stackit_volume_automation""example" {
project_id="your-project-id"
name="My Daily Volume Recovery Point Creation Automation"
description="Creates daily recovery points for targeted volumes"