Skip to content

[User Story] Upgrade Vultr Terraform provider to v2.28.1 and remove block storage attachment workaround #288

@noahwhite

Description

@noahwhite

Story Summary

As an operator, I want to upgrade the Vultr Terraform provider from 2.22.1 to 2.28.1 and replace the block storage attachment workaround with the native provider resource, so that the infrastructure config uses supported patterns and benefits from the upstream bug fix.


Background

The provider was pinned at 2.22.1 due to a bug (vultr/terraform-provider-vultr#660) where vultr_block_storage_attachment would fail with "Nothing to change","status":400 when attaching block storage to a recreated instance. A workaround was implemented using a null_resource with a local-exec provisioner calling vultr-cli directly to perform the attachment.

v2.28.1 includes "resource/block storage: Avoid empty PATCH during update" (PR #675) which is the upstream fix for issue #660. v2.28.1 is also the target because v2.30.1 has a critical provider crash bug filed upstream (UpgradeResourceState panic on vultr_ssh_key cascading to all resources).


✅ Acceptance Criteria

  • Upgrade provider version constraint to 2.28.1 in opentofu/envs/dev/main.tofu and all vultr child modules
  • Update .terraform.lock.hcl with the new provider hashes
  • Remove null_resource "attach_block_storage" from opentofu/modules/vultr/block_storage/main.tofu
  • Remove lifecycle { ignore_changes = [attached_to_instance] } from vultr_block_storage.this
  • Remove the mount_instance_id variable from the block storage module (or rewire as needed for vultr_block_storage_attachment)
  • Add a native vultr_block_storage_attachment resource in the block storage module
  • Declare any new required fields introduced between v2.22.1 and v2.28.1
  • tofu plan produces a clean plan with no unexpected changes
  • Block storage attaches correctly after an instance recreation end-to-end test

📝 Additional Context


📦 Definition of Ready

  • Acceptance criteria defined
  • No unresolved external dependencies
  • Story is estimated
  • Team has necessary skills and access
  • Priority is clear
  • Business value understood

✅ Definition of Done

  • All acceptance criteria met
  • Unit/integration tests written & passing
  • Peer-reviewed
  • Docs updated (if applicable)
  • Verified in staging (if needed)
  • No critical bugs/regressions

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions