From 34013b8ef91f96d4ba8d49a8e8d928443a873b4b Mon Sep 17 00:00:00 2001 From: joannelynch92 Date: Thu, 24 Oct 2024 16:12:12 +0100 Subject: [PATCH] Generate docs for new release (#268) --- .../vmaas_instance_storage_controller.md | 46 +++++++++++++++++++ docs/resources/vmaas_instance.md | 3 ++ docs/resources/vmaas_instance_clone.md | 2 + .../data-source.tf | 12 +++++ .../hpegl_vmaas_instance/all_options.tf | 1 + 5 files changed, 64 insertions(+) create mode 100644 docs/data-sources/vmaas_instance_storage_controller.md create mode 100644 examples/data-sources/hpegl_vmaas_instance_storage_controller/data-source.tf diff --git a/docs/data-sources/vmaas_instance_storage_controller.md b/docs/data-sources/vmaas_instance_storage_controller.md new file mode 100644 index 0000000..72c4719 --- /dev/null +++ b/docs/data-sources/vmaas_instance_storage_controller.md @@ -0,0 +1,46 @@ +--- +page_title: "hpegl_vmaas_instance_storage_controller Data Source - terraform-provider-hpegl" +subcategory: "vmaas" +description: |- + The hpegl_vmaas_instance_storage_controller data source can be used to discover the ID of a storage controller mount. + This can then be used with resources or data sources that require a hpegl_vmaas_instance_disk_type, + such as the hpegl_vmaas_instance resource. +--- +# hpegl_vmaas_instance_storage_controller (Data Source) + +The hpegl_vmaas_instance_storage_controller data source can be used to discover the ID of a storage controller mount. + This can then be used with resources or data sources that require a hpegl_vmaas_instance_disk_type, + such as the hpegl_vmaas_instance resource. + +## Example Usage + +```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" + bus_number = 0 + interface_number = 3 +} +``` + + +## Schema + +### 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 + +### Read-Only + +- `id` (String) The ID of this resource. + + diff --git a/docs/resources/vmaas_instance.md b/docs/resources/vmaas_instance.md index 18e5f78..0c8bac5 100644 --- a/docs/resources/vmaas_instance.md +++ b/docs/resources/vmaas_instance.md @@ -106,6 +106,7 @@ 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 } labels = ["test_label"] @@ -244,6 +245,8 @@ Required: Optional: +- `controller` (String) Storage controller ID can be obtained from hpegl_vmaas_instance_storage_controller + data source. - `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 9dfe411..c87b8cd 100644 --- a/docs/resources/vmaas_instance_clone.md +++ b/docs/resources/vmaas_instance_clone.md @@ -178,6 +178,8 @@ Required: Optional: +- `controller` (String) Storage controller ID can be obtained from hpegl_vmaas_instance_storage_controller + data source. - `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 new file mode 100644 index 0000000..85176e8 --- /dev/null +++ b/examples/data-sources/hpegl_vmaas_instance_storage_controller/data-source.tf @@ -0,0 +1,12 @@ +# (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" + bus_number = 0 + interface_number = 3 +} \ 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 2ecbda9..639c9f4 100644 --- a/examples/resources/hpegl_vmaas_instance/all_options.tf +++ b/examples/resources/hpegl_vmaas_instance/all_options.tf @@ -27,6 +27,7 @@ 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 } labels = ["test_label"]