Skip to content

498 - docs - netapp-ontap_lun resource #516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: integration/main
Choose a base branch
from

Conversation

csahu9
Copy link
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

@Copilot 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"

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.
2 participants