-
Notifications
You must be signed in to change notification settings - Fork 0
Description
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.1inopentofu/envs/dev/main.tofuand all vultr child modules - Update
.terraform.lock.hclwith the new provider hashes - Remove
null_resource "attach_block_storage"fromopentofu/modules/vultr/block_storage/main.tofu - Remove
lifecycle { ignore_changes = [attached_to_instance] }fromvultr_block_storage.this - Remove the
mount_instance_idvariable from the block storage module (or rewire as needed forvultr_block_storage_attachment) - Add a native
vultr_block_storage_attachmentresource in the block storage module - Declare any new required fields introduced between v2.22.1 and v2.28.1
-
tofu planproduces a clean plan with no unexpected changes - Block storage attaches correctly after an instance recreation end-to-end test
📝 Additional Context
- Workaround location:
opentofu/modules/vultr/block_storage/main.tofu-null_resource "attach_block_storage"withlocal-execcallingvultr-cli block-storage attach - Original bug: [BUG] - Attaching block storage to new instance fails vultr/terraform-provider-vultr#660
- Fix in 2.28.1: "resource/block storage: Avoid empty PATCH during update" (PR #675)
- Why not 2.30.1: critical provider crash bug filed upstream - UpgradeResourceState panic on
vultr_ssh_keyand other resources when upgrading from 2.22.1; GHO-109 targets 2.28.1 as the stable fix point - Renovate PR chore(deps): update terraform vultr to v2.30.1 #279: targets 2.30.1, do not merge - a separate feature branch will handle this upgrade
📦 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