498 - docs - netapp-ontap_lun resource#516
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses Issue 498 by updating the documentation for the netapp-ontap_lun resource and introducing attribute validation that requires at least one of two attributes be provided.
- Updated attribute descriptions to provide clearer guidance on expected values.
- Added a configuration validator ensuring either the LUN path ("name") or the base name ("logical_unit") is set.
- Updated documentation examples and changelog to reflect these changes.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/provider/storage/storage_lun_resource.go | Updated attribute descriptions and added a config validator for attribute validation. |
| docs/resources/lun.md | Revised attribute documentation and example configuration to align with the new validation requirements. |
| docs/data-sources/luns.md | Added the serial_number attribute to the read-only schema. |
| docs/data-sources/lun.md | Added the serial_number attribute to the read-only schema. |
| CHANGELOG.md | Updated changelog to document the docs update and attribute validation change. |
Comments suppressed due to low confidence (2)
internal/provider/storage/storage_lun_resource.go:164
- [nitpick] Consider expanding the doc comment for the ConfigValidators function to explain why at least one of 'name' or 'logical_unit' must be provided and how this validator impacts resource configuration.
// ConfigValidators validates entire resource configurations
internal/provider/storage/storage_lun_resource.go:83
- [nitpick] Consider updating this description to mention that this attribute is one of two options (the other being 'logical_unit') and that at least one of these must be provided, to reflect the logic in the config validator.
MarkdownDescription: "Path for the LUN you want to create or modify. Example of correct LUN path: /vol/vol1/lun1"
| - **netapp-ontap_lun**: added `space.scsi_thin_provisioning_support_enabled` option. ([#496](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/496)) | ||
| - **netapp-ontap_volume**, **netapp-ontap_volumes**: added `autosize.*` options to data sources. ([#509](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/509)) | ||
|
|
||
| # 2.2.1 |
There was a problem hiding this comment.
Sorry, I didn't get your question.
I've added the bug fixes and doc changes under 2.2.1 and enhancements under 2.3.0 in the change log.
Do I need to make any changes here?
There was a problem hiding this comment.
Should I re-create this PR for stable-2.2.0 branch?
There was a problem hiding this comment.
Since we are releasing enhancements along with bugs, we will not be having any 2.2.1, so change to 2.3.0
There was a problem hiding this comment.
@suhasbshekar I've updated the changelog under 2.3.0 section.
Issue 498