Skip to content

feat(datastream): add deletion_policy to google_datastream_private_connection#1292

Merged
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-f13e512eb80b039e529fcfa2fa5a52266796c540
Apr 21, 2026
Merged

feat(datastream): add deletion_policy to google_datastream_private_connection#1292
modular-magician merged 1 commit into
terraform-google-modules:masterfrom
modular-magician:downstream-pr-f13e512eb80b039e529fcfa2fa5a52266796c540

Conversation

@modular-magician
Copy link
Copy Markdown
Collaborator

Fixes hashicorp/terraform-provider-google#13054

Currently, google_datastream_private_connection always sends force=true when deleting, which was introduced in #11394. This means child routes (managed outside Terraform) are always deleted without user control.

This PR adds a deletion_policy virtual field (FORCE / DEFAULT) so users can control this behavior:

  • FORCE (default): sends force=true, deleting child routes — preserves current behavior for backwards compatibility
  • DEFAULT: omits the force param, failing if child routes exist

Changes:

  • Add deletion_policy virtual field to PrivateConnection.yaml with default FORCE
  • Update pre_delete template to conditionally set force based on deletion_policy
  • Add example with explicit deletion_policy = "FORCE"
  • Add ignore_read_extra for deletion_policy to existing examples

Reference: https://googlecloudplatform.github.io/magic-modules/best-practices/deletion-behaviors/

google_datastream_private_connection: added `deletion_policy` field to control whether child routes are force-deleted

Derived from GoogleCloudPlatform/magic-modules#17120

…nnection (#17120)

[upstream:f13e512eb80b039e529fcfa2fa5a52266796c540]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 369d6a9 into terraform-google-modules:master Apr 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support force destruction of DataStream private connections

1 participant