494 bug volume autosize value conversion error#512
Merged
suhasbshekar merged 11 commits intostable-2.2.0from Jun 24, 2025
Merged
494 bug volume autosize value conversion error#512suhasbshekar merged 11 commits intostable-2.2.0from
suhasbshekar merged 11 commits intostable-2.2.0from
Conversation
suhasbshekar
requested changes
May 29, 2025
| # 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 |
| @@ -1,3 +1,5 @@ | |||
| # 2.3.0 (2025-xx-xx) | |||
suhasbshekar
requested changes
Jun 5, 2025
Contributor
suhasbshekar
left a comment
There was a problem hiding this comment.
Please address comments
Contributor
|
Please fix the pipeline |
There was a problem hiding this comment.
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
ByteFormatusage for autosize withConvertBytesToUnitIntin Read/Create - Add
UseStateForUnknownplan 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_unitattribute underautosizeis missing a plan modifier; consider addingstringplanmodifier.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" {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.