Skip to content

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

Closed
@nichollri

Description

@nichollri

Documentation Link

https://registry.terraform.io/providers/NetApp/netapp-ontap/latest/docs/resources/lun

Description

The documentation has this:

resource "netapp-ontap_lun" "storage_lun" {

required to know which system to interface with

cx_profile_name = "cluster4"
name = "ACC-import-lun"
svm_name = "carchi-test"
volume_name = "lunTest"
os_type = "linux"
size = 1048576
}
And this:
name (String) Lun name or location.logical_unit

But if you just put in a name you get an error.

Error: error creating storage_lun

│ with netapp-ontap_lun.mylun,
│ on main.tf line 37, in resource "netapp-ontap_lun" "mylun":
│ 37: resource "netapp-ontap_lun" "mylun" {

│ error on POST storage/luns: REST reported error restclient.RestError{Code:"5374127", Message:""newlun1" is an
│ invalid value for a path. Examples of correct paths are "/vol/vol1/disk1" and "/vol/vol1/qtree1/disk1".",
│ Target:"name"}, statusCode: 400, statusCode 400

In order to fix the problem I had to create a "path" for the lun, then it created correctly.

locals {
lun_path = "/vol/${var.vol1_name}/lun1"
}

resource "netapp-ontap_lun" "mylun" {
cx_profile_name = var.clus_name
name = local.lun_path
svm_name = var.svm_name
volume_name = var.vol1_name
os_type = "linux"
size = "10"
size_unit = "gb"
}

At a minimum the documentation should change. This could also be considered a bug in my mind, where really the terraform should take the name and create a path.

References

No response

Would you like to implement a fix?

None

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

Status

2.3.0

Relationships

None yet

Development

No branches or pull requests

Issue actions