Skip to content

494 bug volume autosize value conversion error#512

Merged
suhasbshekar merged 11 commits intostable-2.2.0from
494-bug-volume-autosize-value-conversion-error
Jun 24, 2025
Merged

494 bug volume autosize value conversion error#512
suhasbshekar merged 11 commits intostable-2.2.0from
494-bug-volume-autosize-value-conversion-error

Conversation

@wenjun666
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread scripts/bd_scan.bash Outdated
# change these 2 values to reflect your project name and version:
export DETECT_PROJECT_NAME="Terraform NetApp ONTAP Provider"
export DETECT_PROJECT_VERSION_NAME=2.2.0
export DETECT_PROJECT_VERSION_NAME=2.3.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2.2.1

Comment thread CHANGELOG.md Outdated
@@ -1,3 +1,5 @@
# 2.3.0 (2025-xx-xx)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2.2.1

Copy link
Copy Markdown
Contributor

@suhasbshekar suhasbshekar left a comment

Choose a reason for hiding this comment

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

Please address comments

@suhasbshekar
Copy link
Copy Markdown
Contributor

Please fix the pipeline

@suhasbshekar suhasbshekar requested a review from Copilot June 10, 2025 18:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the autosize value conversion error (#494) by introducing a new unit conversion helper and updating schema and CRUD logic to use it, plus adds plan modifiers to preserve unknown-state handling.

  • Replace ByteFormat usage for autosize with ConvertBytesToUnitInt in Read/Create
  • Add UseStateForUnknown plan modifiers to many schema attributes
  • Bump project version, update examples, and document the fix in CHANGELOG

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/bd_scan.bash Bumped DETECT_PROJECT_VERSION_NAME to 2.2.1
internal/provider/storage/storage_volume_resource.go Added plan modifiers and revised autosize conversion in Read/Create
internal/interfaces/storage_volume.go Added ConvertBytesToUnitInt helper with unit-based conversion
examples/resources/netapp-ontap_volume/resource.tf Simplified example to show autosize usage and updated values
CHANGELOG.md Added entry for autosize conversion bug fix
Comments suppressed due to low confidence (2)

internal/provider/storage/storage_volume_resource.go:491

  • The size_unit attribute under autosize is missing a plan modifier; consider adding stringplanmodifier.UseStateForUnknown() to match other nested attributes.
"size_unit":        schema.StringAttribute{

examples/resources/netapp-ontap_volume/resource.tf:5

  • [nitpick] The example block appears to have merged two separate examples, removing the simple volume example. Please split into distinct example1 and example2 blocks or clarify the usage.
resource "netapp-ontap_volume" "example1" {

Comment thread internal/interfaces/storage_volume.go
Comment thread internal/provider/storage/storage_volume_resource.go
@suhasbshekar suhasbshekar merged commit 81cd234 into stable-2.2.0 Jun 24, 2025
8 checks passed
@suhasbshekar suhasbshekar linked an issue Jun 24, 2025 that may be closed by this pull request
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.

[Bug]: volume autosize value conversion error

3 participants