Skip to content

498 - docs - netapp-ontap_lun resource#516

Merged
suhasbshekar merged 8 commits intointegration/mainfrom
498-docs-netapp-ontap_lun
Jun 17, 2025
Merged

498 - docs - netapp-ontap_lun resource#516
suhasbshekar merged 8 commits intointegration/mainfrom
498-docs-netapp-ontap_lun

Conversation

@csahu9
Copy link
Copy Markdown
Contributor

@csahu9 csahu9 commented Jun 4, 2025

Issue 498

  • rectified documentation
  • added attribute validation
TF_ACC=1 go test `go list ./... | grep -e provider` -v -run=TestAccStorageLunResouce
=== RUN   TestAccStorageLunResouceAlias
--- PASS: TestAccStorageLunResouceAlias (15.35s)
=== RUN   TestAccStorageLunResouce
--- PASS: TestAccStorageLunResouce (15.02s)
PASS
ok      github.com/netapp/terraform-provider-netapp-ontap/internal/provider/storage     30.381s

@csahu9 csahu9 requested a review from carchi8py as a code owner June 4, 2025 05:04
@csahu9 csahu9 added this to the 2.2.1 milestone Jun 4, 2025
@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 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"

Comment thread CHANGELOG.md Outdated
- **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
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.3.0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should I re-create this PR for stable-2.2.0 branch?

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.

Since we are releasing enhancements along with bugs, we will not be having any 2.2.1, so change to 2.3.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@suhasbshekar I've updated the changelog under 2.3.0 section.

@suhasbshekar suhasbshekar removed this from the 2.2.1 milestone Jun 12, 2025
@csahu9 csahu9 requested a review from suhasbshekar June 13, 2025 04:55
@suhasbshekar suhasbshekar merged commit 90cc04a into integration/main Jun 17, 2025
11 of 12 checks passed
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.

[Docs]: netapp-ontap-lun documentation says to enter lun name but it needs to be a path.

3 participants