Skip to content

Conversation

@gmanhas23
Copy link

Problem

When upgrading Terraform provider from v3.3.2 to v4.1.0, users encounter a "cannot update options [toolkit_path]" error. This happens because toolkit_path moved from being a top-level parameter to a nested parameter within the hosts block, but the provider doesn't handle this migration gracefully.

Solution

This PR implements a silent migration strategy for the toolkit_path parameter:

  1. Added toolkit_path as updatable: Added to updatableEnvKeys map to allow updates
  2. Made updates non-destructive: Added to isDestructiveEnvUpdate as false to prevent VDB/dSource downtime
  3. Silent migration: Added DiffSuppressFunc to suppress diff when toolkit_path is set to null/empty, allowing seamless transition from top-level to nested structure
  4. Backward compatibility: Maintains support for existing v3.3.2 configurations while enabling v4.1.0 features

Changes Made

  • internal/provider/commons.go: Added toolkit_path to updatable and non-destructive maps
  • internal/provider/resource_environment.go: Added DiffSuppressFunc for silent parameter migration

Testing

  • ✅ Validated with v3.3.2 → v4.1.0-fix upgrade scenario
  • ✅ Confirmed terraform plan shows "No changes" (silent migration)
  • ✅ Verified backward compatibility with existing environments
  • ✅ Tested update-in-place functionality works without errors

Impact

  • Users: Seamless upgrade path from v3.3.2 to v4.1.0+ without breaking changes
  • Operations: No VDB/dSource downtime during provider upgrades
  • Support: Reduces upgrade-related support tickets and issues

Fixes: DLPXECO-13068

Uddipaan-Hazarika and others added 3 commits May 29, 2025 20:28
DLPXECO - 546 | 550 | Develop -> Main | Env Update | Appdata Doc Update
DLPXECO-12312 Merge terraform 4.1.0 to main branch
Copy link
Contributor

@Uddipaan-Hazarika Uddipaan-Hazarika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants