LogoLogo
WarpStream.comSlackDiscordContact UsCreate Account
  • Overview
    • Introduction
    • Architecture
      • Service Discovery
      • Write Path
      • Read Path
      • Life of a Request (Simplified)
    • Change Log
  • Getting Started
    • Install the WarpStream Agent / CLI
    • Run the Demo
    • "Hello World" for Apache Kafka
  • BYOC
    • Run the Agents Locally
    • Deploy the Agents
      • Object Storage Configuration
      • Kubernetes Known Issues
      • Rolling Restarts and Upgrades
    • Client Configuration
      • Tuning for Performance
      • Configure Clients to Eliminate AZ Networking Costs
        • Force Interzone Load Balancing
      • Configuring Kafka Client ID Features
      • Known Issues
    • Infrastructure as Code
      • Terraform Provider
      • Helm charts
      • Terraform Modules
      • Protecting important resources from accidental deletion
    • Monitoring
      • Pre-made Datadog Dashboard
      • Pre-made Grafana Dashboard
      • Important Metrics and Logs
      • Recommended List of Alerts
      • Monitoring Consumer Groups
      • Hosted Prometheus Endpoint
    • Authentication
      • SASL Authentication
      • Mutual TLS (mTLS)
      • Basic Authentication
    • Advanced Agent Deployment Options
      • Agent Roles
      • Agent Groups
      • Protect Data in Motion with TLS Encryption
      • Low Latency Clusters
      • Network Architecture Considerations
      • Agent Configuration Reference
      • Reducing Infrastructure Costs
      • Client Configuration Auto-tuning
    • Hosted Metadata Endpoint
    • Managed Data Pipelines
      • Cookbooks
    • Schema Registry
      • WarpStream BYOC Schema Registry
      • Schema Validation
      • WarpStream Schema Linking
    • Orbit
    • Port Forwarding (K8s)
  • Reference
    • ACLs
    • Billing
      • Direct billing
      • AWS Marketplace
    • Benchmarking
    • Compression
    • Protocol and Feature Support
      • Kafka vs WarpStream Configuration Reference
      • Compacted topics
      • Topic Configuration Reference
    • Secrets Overview
    • Security and Privacy Considerations
    • API Reference
      • API Keys
        • Create
        • Delete
        • List
      • Virtual Clusters
        • Create
        • Delete
        • Describe
        • List
        • DescribeConfiguration
        • UpdateConfiguration
      • Virtual Clusters Credentials
        • Create
        • Delete
        • List
      • Monitoring
        • Describe All Consumer Groups
      • Pipelines
        • List Pipelines
        • Create Pipeline
        • Delete Pipeline
        • Describe Pipeline
        • Create Pipeline Configuration
        • Change Pipeline State
      • Invoices
        • Get Pending Invoice
        • Get Past Invoice
    • CLI Reference
      • warpstream agent
      • warpstream demo
      • warpstream cli
      • warpstream cli-beta
        • benchmark-consumer
        • benchmark-producer
        • console-consumer
        • console-producer
        • consumer-group-lag
        • diagnose-record
        • file-reader
        • file-scrubber
      • warpstream playground
    • Integrations
      • Arroyo
      • AWS Lambda Triggers
      • ClickHouse
      • Debezium
      • Decodable
      • DeltaStream
      • docker-compose
      • DuckDB
      • ElastiFlow
      • Estuary
      • Fly.io
      • Imply
      • InfluxDB
      • Kestra
      • Materialize
      • MinIO
      • MirrorMaker
      • MotherDuck
      • Ockam
      • OpenTelemetry Collector
      • ParadeDB
      • Parquet
      • Quix Streams
      • Railway
      • Redpanda Console
      • RisingWave
      • Rockset
      • ShadowTraffic
      • SQLite
      • Streambased
      • Streamlit
      • Timeplus
      • Tinybird
      • Upsolver
    • Partitions Auto-Scaler (beta)
    • Serverless Clusters
    • Enable SAML Single Sign-on (SSO)
    • Trusted Domains
    • Diagnostics
      • GoMaxProcs
      • Small Files
Powered by GitBook
On this page
  • Soft deletion
  • Restoring a Virtual Cluster
  • Restoring a Topic
  • Deletion protection
  • Through terraform
  • Through the API

Was this helpful?

  1. BYOC
  2. Infrastructure as Code

Protecting important resources from accidental deletion

PreviousTerraform ModulesNextMonitoring

Last updated 2 days ago

Was this helpful?

Warpstream offers two levels of protection against accidental deletion for two types of important resources:

  • Virtual Clusters

  • Topics

Soft deletion

The first one in soft deletion. By default, when you delete a Virtual Cluster or a Topic, Warpstream does not delete the associated data. It keeps the data around and allows you to restore the Virtual Cluster or Topic in the UI

Restoring a Virtual Cluster

When you delete a virtual cluster, either through the API or through the UI, it will appear in the "recently deleted clusters" section in the .

It will stay there for 30 days before Warpstream deletes the data associated with it.

You can restore it at any time by clicking the Restore Cluster button.

Restoring a Topic

By default, when you delete a Topic from either a Kafka client, or the API, or the UI, it is then impossible to produce and consume to it, but WarpStream also keeps the data around, for 24h by default.

You can restore it at any time by clicking Edit > Restore Topic in the "recently deleted topics" view.

It is also possible to restore it by using the api/v1/undelete_topic API.

To configure how WarpStream interacts with topic deletion with these parameters, please use your usual Kafka client to set these cluster-level parameters (broker level configuration in Kafka terminology):

configuration parameter

warpstream.soft.delete.topic.enable

if true, topic deletion will be a soft deletion, and it will be possible to restore the topics.

If false, deleting a topic will cause the immediate deletion of all of the associated data, with no way to recover it. Defaults to true.

warpstream.soft.delete.topic.ttl.hours

If warpstream.soft.delete.topic.enable is true, a deleted topic's data will be kept for this many hours before being irrecoverably deleted. Defaults to 24.

Deletion protection

The second mechanism to prevent accidental deletion of Virtual Clusters and Topics is what we call "deletion protection". You can set a special flag, either through terraform, or through the API, that prevents the deletion altogether.

Through terraform

Enabling deletion protection will look like this for virtual clusters:

resource "warpstream_virtual_cluster" "test_configuration" {
  name = "vcn_test_configuration"
  tier = "pro"
  configuration = {
    enable_deletion_protection = true
  }
}

And like this for topics:

resource "warpstream_topic" "topic" {
  topic_name         = "logs"
  partition_count    = 1
  virtual_cluster_id = warpstream_virtual_cluster.test.id
  enable_deletion_protection = true
}

Through the API

  • To set the deletion protection flag on a Virtual Cluster, use the UpdateConfiguration API.

  • To set the deletion protection flag on a Topic, set the topic-level configuration warpstream.deletion.protection.enabled to true in the topic using any Kafka client.

To set the deletion protection flag using terraform, please refer to our terraform provider documentation for and for .

Virtual Clusters
Topics
Virtual clusters page
recently deleted clusters view
recently deleted topics view