From b90ccea6ebf09fa7f42155c660d0ed9b6901b650 Mon Sep 17 00:00:00 2001 From: joannelynch92 Date: Mon, 6 Jan 2025 15:53:51 +0000 Subject: [PATCH] Run 'make docs-generate' ahead of release (#296) --- .../data-sources/metal_available_resources.md | 1 + .../vmaas_instance_storage_controller.md | 21 +++++++++---------- docs/data-sources/vmaas_layout.md | 4 ++-- docs/resources/metal_volume.md | 1 + docs/resources/vmaas_instance.md | 11 ++++++++-- docs/resources/vmaas_instance_clone.md | 2 +- .../data-source.tf | 12 ++++------- .../hpegl_vmaas_instance/all_options.tf | 9 +++++++- go.sum | 5 +++++ 9 files changed, 41 insertions(+), 25 deletions(-) diff --git a/docs/data-sources/metal_available_resources.md b/docs/data-sources/metal_available_resources.md index 769b962..cefd73f 100644 --- a/docs/data-sources/metal_available_resources.md +++ b/docs/data-sources/metal_available_resources.md @@ -222,6 +222,7 @@ Read-Only: - `active_site` (String) - `created_site` (String) - `description` (String) +- `export_count` (Number) - `flavor` (String) - `flavor_id` (String) - `id` (String) diff --git a/docs/data-sources/vmaas_instance_storage_controller.md b/docs/data-sources/vmaas_instance_storage_controller.md index 72c4719..fcd11c1 100644 --- a/docs/data-sources/vmaas_instance_storage_controller.md +++ b/docs/data-sources/vmaas_instance_storage_controller.md @@ -17,15 +17,11 @@ The hpegl_vmaas_instance_storage_controller data source can be used to discover ```terraform # (C) Copyright 2024 Hewlett Packard Enterprise Development LP -variable "instance_id" { - type = number - default = 0 -} -data "hpegl_vmaas_instance_storage_controller" "scsi3" { - instance_id = var.instance_id - controller_type = "scsi" +data "hpegl_vmaas_instance_storage_controller" "scsi_0" { + layout_id = data.hpegl_vmaas_layout.vmware.id + controller_name = "SCSI VMware Paravirtual" bus_number = 0 - interface_number = 3 + interface_number = 0 } ``` @@ -35,9 +31,12 @@ data "hpegl_vmaas_instance_storage_controller" "scsi3" { ### Required - `bus_number` (Number) The Bus sequence for a storage controller type -- `controller_type` (String) The storage controller name displayed in an instance. Supported values are `IDE`, `SCSI` -- `instance_id` (Number) Unique ID to identify an instance -- `interface_number` (Number) The interface number to be allocated +- `controller_name` (String) The controller name displayed in an instance storage controller section. +- `layout_id` (String) The layout ID of an instance. + +### Optional + +- `interface_number` (Number) The interface number to be allocated. When not provided, the interface number is automatically allocated. ### Read-Only diff --git a/docs/data-sources/vmaas_layout.md b/docs/data-sources/vmaas_layout.md index 1b3545b..d139cf0 100644 --- a/docs/data-sources/vmaas_layout.md +++ b/docs/data-sources/vmaas_layout.md @@ -4,13 +4,13 @@ subcategory: "vmaas" description: |- The hpegl_vmaas_layout data source can be used to discover the ID of a hpegl vmaas layout. This can then be used with resources or data sources that require a hpegl_vmaas_layout, - such as the hpegl_vmaas_instance resource. + such as the hpegl_vmaas_instance resource or hpegl_vmaas_instance_storage_controller datasource. --- # hpegl_vmaas_layout (Data Source) The hpegl_vmaas_layout data source can be used to discover the ID of a hpegl vmaas layout. This can then be used with resources or data sources that require a hpegl_vmaas_layout, - such as the hpegl_vmaas_instance resource. + such as the hpegl_vmaas_instance resource or hpegl_vmaas_instance_storage_controller datasource. ## Example Usage diff --git a/docs/resources/metal_volume.md b/docs/resources/metal_volume.md index 5a3873f..2778d61 100644 --- a/docs/resources/metal_volume.md +++ b/docs/resources/metal_volume.md @@ -59,6 +59,7 @@ resource "hpegl_metal_volume" "test_vols" { - `active_site` (String) The site where the remote copy role for the volume is Primary at the time of most recent import. - `created_site` (String) The site where the volume was originally created. +- `export_count` (Number) The number of active exports for this volume - `flavor_id` (String) The flavor of the volume to be created. - `id` (String) The ID of this resource. - `location_id` (String) LocationID. diff --git a/docs/resources/vmaas_instance.md b/docs/resources/vmaas_instance.md index a4520d8..227860c 100644 --- a/docs/resources/vmaas_instance.md +++ b/docs/resources/vmaas_instance.md @@ -106,7 +106,14 @@ resource "hpegl_vmaas_instance" "tf_instance" { size = 5 datastore_id = data.hpegl_vmaas_datastore.c_3par.id storage_type = data.hpegl_vmaas_instance_disk_type.vmware_thin.id - controller = data.hpegl_vmaas_instance_storage_controller.scsi3.id + controller = data.hpegl_vmaas_instance_storage_controller.scsi_0.id + } + volume { + name = "data_vol" + size = 5 + datastore_id = data.hpegl_vmaas_datastore.c_3par.id + storage_type = data.hpegl_vmaas_instance_disk_type.vmware_thin.id + controller = data.hpegl_vmaas_instance_storage_controller.scsi_0.id } labels = ["test_label"] @@ -246,7 +253,7 @@ Required: Optional: - `controller` (String) Storage controller ID can be obtained from hpegl_vmaas_instance_storage_controller - data source. + data source. Can not be customized for the first volume. This field can not be updated once volume is created. - `root` (Boolean) true if volume is root - `storage_type` (Number) Storage type ID can be obtained from hpegl_vmaas_instance_disk_type data source. diff --git a/docs/resources/vmaas_instance_clone.md b/docs/resources/vmaas_instance_clone.md index caf866e..6096994 100644 --- a/docs/resources/vmaas_instance_clone.md +++ b/docs/resources/vmaas_instance_clone.md @@ -181,7 +181,7 @@ Required: Optional: - `controller` (String) Storage controller ID can be obtained from hpegl_vmaas_instance_storage_controller - data source. + data source. Can not be customized for the first volume. This field can not be updated once volume is created. - `root` (Boolean) true if volume is root - `storage_type` (Number) Storage type ID can be obtained from hpegl_vmaas_instance_disk_type data source. diff --git a/examples/data-sources/hpegl_vmaas_instance_storage_controller/data-source.tf b/examples/data-sources/hpegl_vmaas_instance_storage_controller/data-source.tf index 85176e8..30f75fa 100644 --- a/examples/data-sources/hpegl_vmaas_instance_storage_controller/data-source.tf +++ b/examples/data-sources/hpegl_vmaas_instance_storage_controller/data-source.tf @@ -1,12 +1,8 @@ # (C) Copyright 2024 Hewlett Packard Enterprise Development LP -variable "instance_id" { - type = number - default = 0 -} -data "hpegl_vmaas_instance_storage_controller" "scsi3" { - instance_id = var.instance_id - controller_type = "scsi" +data "hpegl_vmaas_instance_storage_controller" "scsi_0" { + layout_id = data.hpegl_vmaas_layout.vmware.id + controller_name = "SCSI VMware Paravirtual" bus_number = 0 - interface_number = 3 + interface_number = 0 } \ No newline at end of file diff --git a/examples/resources/hpegl_vmaas_instance/all_options.tf b/examples/resources/hpegl_vmaas_instance/all_options.tf index 639c9f4..d3b07d3 100644 --- a/examples/resources/hpegl_vmaas_instance/all_options.tf +++ b/examples/resources/hpegl_vmaas_instance/all_options.tf @@ -27,7 +27,14 @@ resource "hpegl_vmaas_instance" "tf_instance" { size = 5 datastore_id = data.hpegl_vmaas_datastore.c_3par.id storage_type = data.hpegl_vmaas_instance_disk_type.vmware_thin.id - controller = data.hpegl_vmaas_instance_storage_controller.scsi3.id + controller = data.hpegl_vmaas_instance_storage_controller.scsi_0.id + } + volume { + name = "data_vol" + size = 5 + datastore_id = data.hpegl_vmaas_datastore.c_3par.id + storage_type = data.hpegl_vmaas_instance_disk_type.vmware_thin.id + controller = data.hpegl_vmaas_instance_storage_controller.scsi_0.id } labels = ["test_label"] diff --git a/go.sum b/go.sum index 952d969..e00f3ee 100644 --- a/go.sum +++ b/go.sum @@ -352,6 +352,7 @@ github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3 github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gostaticanalysis/testutil v0.5.0 h1:Dq4wT1DdTwTGCQQv3rl3IvD5Ld0E6HiY+3Zh0sUGqw8= +github.com/gostaticanalysis/testutil v0.5.0/go.mod h1:OLQSbuM6zw2EvCcXTz1lVq5unyoNft372msDY0nY5Hs= github.com/hashicorp/cli v1.1.6 h1:CMOV+/LJfL1tXCOKrgAX0uRKnzjj/mpmqNXloRSy2K8= github.com/hashicorp/cli v1.1.6/go.mod h1:MPon5QYlgjjo0BSoAiN0ESeT5fRzDjVRp+uioJ0piz4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -557,6 +558,8 @@ github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5co github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= @@ -699,7 +702,9 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8 github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/tdakkota/asciicheck v0.3.0 h1:LqDGgZdholxZMaJgpM6b0U9CFIjDCbFdUF00bDnBKOQ= github.com/tdakkota/asciicheck v0.3.0/go.mod h1:KoJKXuX/Z/lt6XzLo8WMBfQGzak0SrAKZlvRr4tg8Ac= +github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= github.com/tetafro/godot v1.4.20 h1:z/p8Ek55UdNvzt4TFn2zx2KscpW4rWqcnUrdmvWJj7E= github.com/tetafro/godot v1.4.20/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio=