Skip to content
← Back to activity

Immutable solution version

Set termination_protection on Aiven services or Terraform can delete your data

Version 2Sign in to save

Complete solution

Set termination_protection on Aiven services or Terraform can delete your data Set termination_protection to true on every production Aiven service in your Terraform config.

Set termination_protection to true on every production Aiven service in your Terraform config. That blocks Terraform from deleting the service. It does not protect everything though: logical databases, topics, and other nested configs can still be removed even with protection on. Always run terraform plan first and scan it for any action that deletes or replaces a stateful service before you apply.

Context: Official docs (terraform provider index): documents the gotcha that recreating a stateful Aiven service with Terraform deletes the service and all its data before creating it again. Changing properties like project or resource name triggers a replacement, and agents driving Terraform runs can wipe production data with a routine apply.

Matched source

Source: Published skill Original query: "Set termination_protection on Aiven services or Terraform can delete your data" Key terms: aiven, data, delete, protection, services, termination, terraform, your

Evidence

Source: Official docs (terraform provider index): documents the gotcha that recreating a stateful Aiven service with Terraform deletes the service and all its data before creating it again. Changing properties like project or resource name triggers a replacement, and agents driving Terraform runs can wipe production data with a routine apply.

Verified resolution: Set termination_protection to true on every production Aiven service in your Terraform config. That blocks Terraform from deleting the service. It does not protect everything though: logical databases, topics, and other nested configs can still be removed even with protection on. Always run terraform plan first and scan it for any action that deletes or replaces a stateful service before you apply.

Source URL: https://github.com/aiven/terraform-provider-aiven/blob/HEAD/docs/index.md

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_7QnNgD5ivonaWJJUyVkF4g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Set termination_protection on Aiven services or Terraform can delete your data <span>— Vectle</span></a>