From b93db64db3a27c5fcb107fc68b140652bba75f8b Mon Sep 17 00:00:00 2001 From: Kenkare Date: Thu, 24 Oct 2024 15:32:04 +0530 Subject: [PATCH] Updated provider version to 1.5.0 --- docs/data-sources/bios.md | 2 +- docs/data-sources/dell_idrac_attributes.md | 2 +- .../directory_service_auth_provider.md | 122 ++++++++++++++++- docs/data-sources/firmware_inventory.md | 2 +- docs/data-sources/network.md | 2 +- docs/data-sources/storage.md | 2 +- docs/data-sources/storage_controller.md | 122 ++++++++++++++++- docs/data-sources/system_boot.md | 2 +- docs/data-sources/virtual_media.md | 2 +- docs/index.md | 2 +- docs/resources/bios.md | 2 +- docs/resources/boot_order.md | 2 +- docs/resources/boot_source_override.md | 2 +- docs/resources/certificate.md | 2 +- docs/resources/dell_idrac_attributes.md | 2 +- docs/resources/dell_lc_attributes.md | 2 +- docs/resources/dell_system_attributes.md | 2 +- .../directory_service_auth_provider.md | 128 +++++++++++++++++- docs/resources/idrac_firmware_update.md | 2 +- ...rac_server_configuration_profile_export.md | 2 +- ...rac_server_configuration_profile_import.md | 2 +- docs/resources/manager_reset.md | 2 +- docs/resources/network_adapter.md | 2 +- docs/resources/power.md | 2 +- docs/resources/simple_update.md | 2 +- docs/resources/storage_controller.md | 128 +++++++++++++++++- docs/resources/storage_volume.md | 2 +- docs/resources/user_account.md | 2 +- docs/resources/user_account_password.md | 2 +- docs/resources/virtual_media.md | 2 +- .../data-sources/redfish_bios/provider.tf | 2 +- .../redfish_dell_idrac_attributes/provider.tf | 2 +- .../redfish_firmware_inventory/provider.tf | 2 +- .../data-sources/redfish_network/provider.tf | 2 +- .../data-sources/redfish_storage/provider.tf | 2 +- .../redfish_system_boot/provider.tf | 2 +- .../redfish_virtual_media/provider.tf | 2 +- examples/provider/provider.tf | 2 +- examples/resources/redfish_bios/provider.tf | 2 +- .../resources/redfish_boot_order/provider.tf | 2 +- .../redfish_boot_source_override/provider.tf | 2 +- .../resources/redfish_certificate/provider.tf | 2 +- .../redfish_dell_idrac_attributes/provider.tf | 2 +- .../redfish_dell_lc_attributes/provider.tf | 2 +- .../provider.tf | 2 +- .../redfish_idrac_firmware_update/provider.tf | 2 +- .../provider.tf | 2 +- .../provider.tf | 2 +- .../redfish_manager_reset/provider.tf | 2 +- .../redfish_network_adapter/provider.tf | 2 +- examples/resources/redfish_power/provider.tf | 2 +- .../redfish_simple_update/provider.tf | 2 +- .../redfish_storage_volume/provider.tf | 2 +- .../redfish_user_account/provider.tf | 2 +- .../redfish_user_account_password/provider.tf | 2 +- .../redfish_virtual_media/provider.tf | 2 +- .../directory_service_auth_provider.md.tmpl | 49 +++++++ .../data-sources/storage_controller.md.tmpl | 49 +++++++ .../directory_service_auth_provider.md.tmpl | 63 +++++++++ .../resources/storage_controller.md.tmpl | 63 +++++++++ 60 files changed, 772 insertions(+), 56 deletions(-) create mode 100644 templates/data-sources/directory_service_auth_provider.md.tmpl create mode 100644 templates/data-sources/storage_controller.md.tmpl create mode 100644 templates/resources/directory_service_auth_provider.md.tmpl create mode 100644 templates/resources/storage_controller.md.tmpl diff --git a/docs/data-sources/bios.md b/docs/data-sources/bios.md index d065bc53..96054662 100644 --- a/docs/data-sources/bios.md +++ b/docs/data-sources/bios.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/data-sources/dell_idrac_attributes.md b/docs/data-sources/dell_idrac_attributes.md index dede9c0e..67e433e1 100644 --- a/docs/data-sources/dell_idrac_attributes.md +++ b/docs/data-sources/dell_idrac_attributes.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/data-sources/directory_service_auth_provider.md b/docs/data-sources/directory_service_auth_provider.md index d342072e..5b26b767 100644 --- a/docs/data-sources/directory_service_auth_provider.md +++ b/docs/data-sources/directory_service_auth_provider.md @@ -1,5 +1,21 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs +# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. +# +# Licensed under the Mozilla Public License Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://mozilla.org/MPL/2.0/ +# +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +title: "redfish_directory_service_auth_provider data source" +linkTitle: "redfish_directory_service_auth_provider" page_title: "redfish_directory_service_auth_provider Data Source - terraform-provider-redfish" subcategory: "" description: |- @@ -12,6 +28,107 @@ This Terraform datasource is used to query existing Directory Service auth provi ## Example Usage +variables.tf +```terraform +/* +Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +variable "rack1" { + type = map(object({ + user = string + password = string + endpoint = string + ssl_insecure = bool + })) +} +``` + +terraform.tfvars +```terraform +/* +Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +rack1 = { + "my-server-1" = { + user = "admin" + password = "passw0rd" + endpoint = "https://my-server-1.myawesomecompany.org" + ssl_insecure = true + }, + "my-server-2" = { + user = "admin" + password = "passw0rd" + endpoint = "https://my-server-2.myawesomecompany.org" + ssl_insecure = true + }, +} +``` + +provider.tf +```terraform +/* +Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +terraform { + required_providers { + redfish = { + version = "1.5.0" + source = "registry.terraform.io/dell/redfish" + } + } +} + +provider "redfish" { + # `redfish_servers` is used to align with enhancements to password management. + # Map of server BMCs with their alias keys and respective user credentials. + # This is required when resource/datasource's `redfish_alias` is not null + redfish_servers = var.rack1 +} +``` + +main.tf ```terraform /* Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. @@ -52,6 +169,8 @@ output "directory_service_auth_provider" { } ``` +After the successful execution of the above data block, we can see the output in the state file. + ## Schema @@ -209,3 +328,4 @@ Read-Only: - `health` (String) health - `health_rollup` (String) health rollup - `state` (String) state of the storage controller + diff --git a/docs/data-sources/firmware_inventory.md b/docs/data-sources/firmware_inventory.md index 77bc7e44..db59a33f 100644 --- a/docs/data-sources/firmware_inventory.md +++ b/docs/data-sources/firmware_inventory.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/data-sources/network.md b/docs/data-sources/network.md index 271b2591..aa0a4212 100644 --- a/docs/data-sources/network.md +++ b/docs/data-sources/network.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/data-sources/storage.md b/docs/data-sources/storage.md index 9554b3d0..16c59779 100644 --- a/docs/data-sources/storage.md +++ b/docs/data-sources/storage.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/data-sources/storage_controller.md b/docs/data-sources/storage_controller.md index 3f305849..c131128a 100644 --- a/docs/data-sources/storage_controller.md +++ b/docs/data-sources/storage_controller.md @@ -1,5 +1,21 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs +# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. +# +# Licensed under the Mozilla Public License Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://mozilla.org/MPL/2.0/ +# +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +title: "redfish_storage_controller data source" +linkTitle: "redfish_storage_controller" page_title: "redfish_storage_controller Data Source - terraform-provider-redfish" subcategory: "" description: |- @@ -12,6 +28,107 @@ This Terraform datasource is used to query existing storage controller configura ## Example Usage +variables.tf +```terraform +/* +Copyright (c) 2021-2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +variable "rack1" { + type = map(object({ + user = string + password = string + endpoint = string + ssl_insecure = bool + })) +} +``` + +terraform.tfvars +```terraform +/* +Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +rack1 = { + "my-server-1" = { + user = "admin" + password = "passw0rd" + endpoint = "https://my-server-1.myawesomecompany.org" + ssl_insecure = true + }, + "my-server-2" = { + user = "admin" + password = "passw0rd" + endpoint = "https://my-server-2.myawesomecompany.org" + ssl_insecure = true + }, +} +``` + +provider.tf +```terraform +/* +Copyright (c) 2022-2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +terraform { + required_providers { + redfish = { + version = "1.5.0" + source = "registry.terraform.io/dell/redfish" + } + } +} + +provider "redfish" { + # `redfish_servers` is used to align with enhancements to password management. + # Map of server BMCs with their alias keys and respective user credentials. + # This is required when resource/datasource's `redfish_alias` is not null + redfish_servers = var.rack1 +} +``` + +main.tf ```terraform /* Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. @@ -67,6 +184,8 @@ output "storage_controller_example" { } ``` +After the successful execution of the above data block, we can see the output in the state file. + ## Schema @@ -283,3 +402,4 @@ Read-Only: - `health` (String) health - `health_rollup` (String) health rollup - `state` (String) state of the storage controller + diff --git a/docs/data-sources/system_boot.md b/docs/data-sources/system_boot.md index 6b3f5212..a8dc52cc 100644 --- a/docs/data-sources/system_boot.md +++ b/docs/data-sources/system_boot.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/data-sources/virtual_media.md b/docs/data-sources/virtual_media.md index c873078b..ce7749a7 100644 --- a/docs/data-sources/virtual_media.md +++ b/docs/data-sources/virtual_media.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/index.md b/docs/index.md index 57f11ce0..245c87f4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -175,7 +175,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/bios.md b/docs/resources/bios.md index 6f7688e1..4349293d 100644 --- a/docs/resources/bios.md +++ b/docs/resources/bios.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/boot_order.md b/docs/resources/boot_order.md index 029e86ce..9ecc0c6e 100644 --- a/docs/resources/boot_order.md +++ b/docs/resources/boot_order.md @@ -116,7 +116,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/boot_source_override.md b/docs/resources/boot_source_override.md index 543e58b5..a8c3d746 100644 --- a/docs/resources/boot_source_override.md +++ b/docs/resources/boot_source_override.md @@ -118,7 +118,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/certificate.md b/docs/resources/certificate.md index 7a04d920..f561fda0 100644 --- a/docs/resources/certificate.md +++ b/docs/resources/certificate.md @@ -122,7 +122,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/dell_idrac_attributes.md b/docs/resources/dell_idrac_attributes.md index a0a6d310..b116d49d 100644 --- a/docs/resources/dell_idrac_attributes.md +++ b/docs/resources/dell_idrac_attributes.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/dell_lc_attributes.md b/docs/resources/dell_lc_attributes.md index fb650ac3..121a9889 100644 --- a/docs/resources/dell_lc_attributes.md +++ b/docs/resources/dell_lc_attributes.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/dell_system_attributes.md b/docs/resources/dell_system_attributes.md index fb62eb72..2eb48e3b 100644 --- a/docs/resources/dell_system_attributes.md +++ b/docs/resources/dell_system_attributes.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/directory_service_auth_provider.md b/docs/resources/directory_service_auth_provider.md index 758bd9a7..b65c947e 100644 --- a/docs/resources/directory_service_auth_provider.md +++ b/docs/resources/directory_service_auth_provider.md @@ -1,5 +1,21 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs +# Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved. +# +# Licensed under the Mozilla Public License Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://mozilla.org/MPL/2.0/ +# +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +title: "redfish_directory_service_auth_provider resource" +linkTitle: "redfish_directory_service_auth_provider" page_title: "redfish_directory_service_auth_provider Resource - terraform-provider-redfish" subcategory: "" description: |- @@ -12,6 +28,107 @@ This Terraform resource is used to configure Directory Service Auth Provider Act ## Example Usage +variables.tf +```terraform +/* +Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +variable "rack1" { + type = map(object({ + user = string + password = string + endpoint = string + ssl_insecure = bool + })) +} +``` + +terraform.tfvars +```terraform +/* +Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +rack1 = { + "my-server-1" = { + user = "admin" + password = "passw0rd" + endpoint = "https://my-server-1.myawesomecompany.org" + ssl_insecure = true + }, + "my-server-2" = { + user = "admin" + password = "passw0rd" + endpoint = "https://my-server-2.myawesomecompany.org" + ssl_insecure = true + }, +} +``` + +provider.tf +```terraform +/* +Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +terraform { + required_providers { + redfish = { + version = "1.5.0" + source = "registry.terraform.io/dell/redfish" + } + } +} + +provider "redfish" { + # `redfish_servers` is used to align with enhancements to password management. + # Map of server BMCs with their alias keys and respective user credentials. + # This is required when resource/datasource's `redfish_alias` is not null + redfish_servers = var.rack1 +} +``` + +main.tf ```terraform /* Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. @@ -158,6 +275,8 @@ resource "redfish_directory_service_auth_provider" "ds_auth" { } ``` +After the successful execution of the above resource block, the directory service auth provider would have been configured. More details can be verified through state file. + ## Schema @@ -294,3 +413,10 @@ terraform import redfish_directory_service_auth_provider.ds_auth '{"username":"< # redfish_alias is used to align with enhancements to password management. terraform import redfish_directory_service_auth_provider.ds_auth '{"redfish_alias":""}' ``` + +1. This will import the Directory Service Auth Provider configuration into your Terraform state. +2. After successful import, you can run terraform state list to ensure the resource has been imported successfully. +3. Now, you can fill in the resource block with the appropriate arguments and settings that match the imported resource's real-world configuration. +4. Execute terraform plan to see if your configuration and the imported resource are in sync. Make adjustments if needed. +5. Finally, execute terraform apply to bring the resource fully under Terraform's management. +6. Now, the resource which was not part of terraform became part of Terraform managed infrastructure. diff --git a/docs/resources/idrac_firmware_update.md b/docs/resources/idrac_firmware_update.md index 0a3062d7..d527afd9 100644 --- a/docs/resources/idrac_firmware_update.md +++ b/docs/resources/idrac_firmware_update.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/idrac_server_configuration_profile_export.md b/docs/resources/idrac_server_configuration_profile_export.md index 4487b3f8..c18c3baa 100644 --- a/docs/resources/idrac_server_configuration_profile_export.md +++ b/docs/resources/idrac_server_configuration_profile_export.md @@ -125,7 +125,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/idrac_server_configuration_profile_import.md b/docs/resources/idrac_server_configuration_profile_import.md index 46f55918..31278f15 100644 --- a/docs/resources/idrac_server_configuration_profile_import.md +++ b/docs/resources/idrac_server_configuration_profile_import.md @@ -125,7 +125,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/manager_reset.md b/docs/resources/manager_reset.md index 21a237bb..39c38a58 100644 --- a/docs/resources/manager_reset.md +++ b/docs/resources/manager_reset.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/network_adapter.md b/docs/resources/network_adapter.md index c75942bc..e9bf9b70 100644 --- a/docs/resources/network_adapter.md +++ b/docs/resources/network_adapter.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/power.md b/docs/resources/power.md index e666b874..eadcd2a5 100644 --- a/docs/resources/power.md +++ b/docs/resources/power.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/simple_update.md b/docs/resources/simple_update.md index 18734bad..8b5f6fd8 100644 --- a/docs/resources/simple_update.md +++ b/docs/resources/simple_update.md @@ -114,7 +114,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/storage_controller.md b/docs/resources/storage_controller.md index 31bbd81d..7421e732 100644 --- a/docs/resources/storage_controller.md +++ b/docs/resources/storage_controller.md @@ -1,5 +1,21 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs +# Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved. +# +# Licensed under the Mozilla Public License Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://mozilla.org/MPL/2.0/ +# +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +title: "redfish_storage_controller resource" +linkTitle: "redfish_storage_controller" page_title: "redfish_storage_controller Resource - terraform-provider-redfish" subcategory: "" description: |- @@ -12,6 +28,107 @@ This Terraform resource is used to configure the storage controller. We can read ## Example Usage +variables.tf +```terraform +/* +Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +variable "rack1" { + type = map(object({ + user = string + password = string + endpoint = string + ssl_insecure = bool + })) +} +``` + +terraform.tfvars +```terraform +/* +Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +rack1 = { + "my-server-1" = { + user = "admin" + password = "passw0rd" + endpoint = "https://my-server-1.myawesomecompany.org" + ssl_insecure = true + }, + "my-server-2" = { + user = "admin" + password = "passw0rd" + endpoint = "https://my-server-2.myawesomecompany.org" + ssl_insecure = true + }, +} +``` + +provider.tf +```terraform +/* +Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. + +Licensed under the Mozilla Public License Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://mozilla.org/MPL/2.0/ + + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +terraform { + required_providers { + redfish = { + version = "1.5.0" + source = "registry.terraform.io/dell/redfish" + } + } +} + +provider "redfish" { + # `redfish_servers` is used to align with enhancements to password management. + # Map of server BMCs with their alias keys and respective user credentials. + # This is required when resource/datasource's `redfish_alias` is not null + redfish_servers = var.rack1 +} +``` + +main.tf ```terraform /* Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. @@ -179,6 +296,8 @@ resource "redfish_storage_controller" "storage_controller_example" { } ``` +After the successful execution of the above resource block, the storage controller would have been configured. More details can be verified through state file. + ## Schema @@ -314,3 +433,10 @@ terraform import redfish_storage_controller.storage_controller_example '{"system # redfish_alias is used to align with enhancements to password management. terraform import redfish_storage_controller.storage_controller_example '{"storage_id":"","controller_id":"","redfish_alias":""}' ``` + +1. This will import the Storage Controller configuration into your Terraform state. +2. After successful import, you can run terraform state list to ensure the resource has been imported successfully. +3. Now, you can fill in the resource block with the appropriate arguments and settings that match the imported resource's real-world configuration. +4. Execute terraform plan to see if your configuration and the imported resource are in sync. Make adjustments if needed. +5. Finally, execute terraform apply to bring the resource fully under Terraform's management. +6. Now, the resource which was not part of terraform became part of Terraform managed infrastructure. diff --git a/docs/resources/storage_volume.md b/docs/resources/storage_volume.md index 237bb6f6..d0e61e67 100644 --- a/docs/resources/storage_volume.md +++ b/docs/resources/storage_volume.md @@ -116,7 +116,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/user_account.md b/docs/resources/user_account.md index efe8a061..0dab80d2 100644 --- a/docs/resources/user_account.md +++ b/docs/resources/user_account.md @@ -122,7 +122,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/user_account_password.md b/docs/resources/user_account_password.md index 9a735eeb..d70fa298 100644 --- a/docs/resources/user_account_password.md +++ b/docs/resources/user_account_password.md @@ -61,7 +61,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/docs/resources/virtual_media.md b/docs/resources/virtual_media.md index 9e63d785..da1b3b99 100644 --- a/docs/resources/virtual_media.md +++ b/docs/resources/virtual_media.md @@ -116,7 +116,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/data-sources/redfish_bios/provider.tf b/examples/data-sources/redfish_bios/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/data-sources/redfish_bios/provider.tf +++ b/examples/data-sources/redfish_bios/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/data-sources/redfish_dell_idrac_attributes/provider.tf b/examples/data-sources/redfish_dell_idrac_attributes/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/data-sources/redfish_dell_idrac_attributes/provider.tf +++ b/examples/data-sources/redfish_dell_idrac_attributes/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/data-sources/redfish_firmware_inventory/provider.tf b/examples/data-sources/redfish_firmware_inventory/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/data-sources/redfish_firmware_inventory/provider.tf +++ b/examples/data-sources/redfish_firmware_inventory/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/data-sources/redfish_network/provider.tf b/examples/data-sources/redfish_network/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/data-sources/redfish_network/provider.tf +++ b/examples/data-sources/redfish_network/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/data-sources/redfish_storage/provider.tf b/examples/data-sources/redfish_storage/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/data-sources/redfish_storage/provider.tf +++ b/examples/data-sources/redfish_storage/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/data-sources/redfish_system_boot/provider.tf b/examples/data-sources/redfish_system_boot/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/data-sources/redfish_system_boot/provider.tf +++ b/examples/data-sources/redfish_system_boot/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/data-sources/redfish_virtual_media/provider.tf b/examples/data-sources/redfish_virtual_media/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/data-sources/redfish_virtual_media/provider.tf +++ b/examples/data-sources/redfish_virtual_media/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 33ec9f1e..3e8e4459 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_bios/provider.tf b/examples/resources/redfish_bios/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_bios/provider.tf +++ b/examples/resources/redfish_bios/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_boot_order/provider.tf b/examples/resources/redfish_boot_order/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_boot_order/provider.tf +++ b/examples/resources/redfish_boot_order/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_boot_source_override/provider.tf b/examples/resources/redfish_boot_source_override/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_boot_source_override/provider.tf +++ b/examples/resources/redfish_boot_source_override/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_certificate/provider.tf b/examples/resources/redfish_certificate/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_certificate/provider.tf +++ b/examples/resources/redfish_certificate/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_dell_idrac_attributes/provider.tf b/examples/resources/redfish_dell_idrac_attributes/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_dell_idrac_attributes/provider.tf +++ b/examples/resources/redfish_dell_idrac_attributes/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_dell_lc_attributes/provider.tf b/examples/resources/redfish_dell_lc_attributes/provider.tf index f6cc73f6..3a767c0e 100644 --- a/examples/resources/redfish_dell_lc_attributes/provider.tf +++ b/examples/resources/redfish_dell_lc_attributes/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_dell_system_attributes/provider.tf b/examples/resources/redfish_dell_system_attributes/provider.tf index f6cc73f6..3a767c0e 100644 --- a/examples/resources/redfish_dell_system_attributes/provider.tf +++ b/examples/resources/redfish_dell_system_attributes/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_idrac_firmware_update/provider.tf b/examples/resources/redfish_idrac_firmware_update/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_idrac_firmware_update/provider.tf +++ b/examples/resources/redfish_idrac_firmware_update/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_idrac_server_configuration_profile_export/provider.tf b/examples/resources/redfish_idrac_server_configuration_profile_export/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_idrac_server_configuration_profile_export/provider.tf +++ b/examples/resources/redfish_idrac_server_configuration_profile_export/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_idrac_server_configuration_profile_import/provider.tf b/examples/resources/redfish_idrac_server_configuration_profile_import/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_idrac_server_configuration_profile_import/provider.tf +++ b/examples/resources/redfish_idrac_server_configuration_profile_import/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_manager_reset/provider.tf b/examples/resources/redfish_manager_reset/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_manager_reset/provider.tf +++ b/examples/resources/redfish_manager_reset/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_network_adapter/provider.tf b/examples/resources/redfish_network_adapter/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_network_adapter/provider.tf +++ b/examples/resources/redfish_network_adapter/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_power/provider.tf b/examples/resources/redfish_power/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_power/provider.tf +++ b/examples/resources/redfish_power/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_simple_update/provider.tf b/examples/resources/redfish_simple_update/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_simple_update/provider.tf +++ b/examples/resources/redfish_simple_update/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_storage_volume/provider.tf b/examples/resources/redfish_storage_volume/provider.tf index f6cc73f6..3a767c0e 100644 --- a/examples/resources/redfish_storage_volume/provider.tf +++ b/examples/resources/redfish_storage_volume/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_user_account/provider.tf b/examples/resources/redfish_user_account/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_user_account/provider.tf +++ b/examples/resources/redfish_user_account/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_user_account_password/provider.tf b/examples/resources/redfish_user_account_password/provider.tf index 498c9045..19d46cc5 100644 --- a/examples/resources/redfish_user_account_password/provider.tf +++ b/examples/resources/redfish_user_account_password/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/examples/resources/redfish_virtual_media/provider.tf b/examples/resources/redfish_virtual_media/provider.tf index 6e70f88f..a21173d0 100644 --- a/examples/resources/redfish_virtual_media/provider.tf +++ b/examples/resources/redfish_virtual_media/provider.tf @@ -18,7 +18,7 @@ limitations under the License. terraform { required_providers { redfish = { - version = "1.4.0" + version = "1.5.0" source = "registry.terraform.io/dell/redfish" } } diff --git a/templates/data-sources/directory_service_auth_provider.md.tmpl b/templates/data-sources/directory_service_auth_provider.md.tmpl new file mode 100644 index 00000000..1c615731 --- /dev/null +++ b/templates/data-sources/directory_service_auth_provider.md.tmpl @@ -0,0 +1,49 @@ +--- +# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. +# +# Licensed under the Mozilla Public License Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://mozilla.org/MPL/2.0/ +# +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +title: "{{.Name }} {{.Type | lower}}" +linkTitle: "{{.Name}}" +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name }} ({{.Type}}) + +{{ .Description | trimspace }} + +{{ if .HasExample -}} +## Example Usage + +variables.tf +{{ tffile ( printf "examples/data-sources/%s/variables.tf" .Name ) }} + +terraform.tfvars +{{ tffile ( printf "examples/data-sources/%s/terraform.tfvars" .Name ) }} + +provider.tf +{{ tffile ( printf "examples/data-sources/%s/provider.tf" .Name ) }} + +main.tf +{{tffile .ExampleFile }} + +After the successful execution of the above data block, we can see the output in the state file. + +{{- end }} + +{{ .SchemaMarkdown | trimspace }} + diff --git a/templates/data-sources/storage_controller.md.tmpl b/templates/data-sources/storage_controller.md.tmpl new file mode 100644 index 00000000..1c615731 --- /dev/null +++ b/templates/data-sources/storage_controller.md.tmpl @@ -0,0 +1,49 @@ +--- +# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved. +# +# Licensed under the Mozilla Public License Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://mozilla.org/MPL/2.0/ +# +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +title: "{{.Name }} {{.Type | lower}}" +linkTitle: "{{.Name}}" +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name }} ({{.Type}}) + +{{ .Description | trimspace }} + +{{ if .HasExample -}} +## Example Usage + +variables.tf +{{ tffile ( printf "examples/data-sources/%s/variables.tf" .Name ) }} + +terraform.tfvars +{{ tffile ( printf "examples/data-sources/%s/terraform.tfvars" .Name ) }} + +provider.tf +{{ tffile ( printf "examples/data-sources/%s/provider.tf" .Name ) }} + +main.tf +{{tffile .ExampleFile }} + +After the successful execution of the above data block, we can see the output in the state file. + +{{- end }} + +{{ .SchemaMarkdown | trimspace }} + diff --git a/templates/resources/directory_service_auth_provider.md.tmpl b/templates/resources/directory_service_auth_provider.md.tmpl new file mode 100644 index 00000000..adc3eb3f --- /dev/null +++ b/templates/resources/directory_service_auth_provider.md.tmpl @@ -0,0 +1,63 @@ +--- +# Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved. +# +# Licensed under the Mozilla Public License Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://mozilla.org/MPL/2.0/ +# +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +title: "{{.Name }} {{.Type | lower}}" +linkTitle: "{{.Name }}" +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name }} ({{.Type}}) + +{{ .Description | trimspace }} + +{{ if .HasExample -}} +## Example Usage + +variables.tf +{{ tffile ( printf "examples/resources/%s/variables.tf" .Name ) }} + +terraform.tfvars +{{ tffile ( printf "examples/resources/%s/terraform.tfvars" .Name ) }} + +provider.tf +{{ tffile ( printf "examples/resources/%s/provider.tf" .Name ) }} + +main.tf +{{tffile .ExampleFile }} + +After the successful execution of the above resource block, the directory service auth provider would have been configured. More details can be verified through state file. +{{- end }} + +{{ .SchemaMarkdown | trimspace }} + +{{ if .HasImport -}} +## Import + +Import is supported using the following syntax: + +{{codefile "shell" .ImportFile }} + +1. This will import the Directory Service Auth Provider configuration into your Terraform state. +2. After successful import, you can run terraform state list to ensure the resource has been imported successfully. +3. Now, you can fill in the resource block with the appropriate arguments and settings that match the imported resource's real-world configuration. +4. Execute terraform plan to see if your configuration and the imported resource are in sync. Make adjustments if needed. +5. Finally, execute terraform apply to bring the resource fully under Terraform's management. +6. Now, the resource which was not part of terraform became part of Terraform managed infrastructure. + +{{- end }} diff --git a/templates/resources/storage_controller.md.tmpl b/templates/resources/storage_controller.md.tmpl new file mode 100644 index 00000000..4f726ce8 --- /dev/null +++ b/templates/resources/storage_controller.md.tmpl @@ -0,0 +1,63 @@ +--- +# Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved. +# +# Licensed under the Mozilla Public License Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://mozilla.org/MPL/2.0/ +# +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +title: "{{.Name }} {{.Type | lower}}" +linkTitle: "{{.Name }}" +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name }} ({{.Type}}) + +{{ .Description | trimspace }} + +{{ if .HasExample -}} +## Example Usage + +variables.tf +{{ tffile ( printf "examples/resources/%s/variables.tf" .Name ) }} + +terraform.tfvars +{{ tffile ( printf "examples/resources/%s/terraform.tfvars" .Name ) }} + +provider.tf +{{ tffile ( printf "examples/resources/%s/provider.tf" .Name ) }} + +main.tf +{{tffile .ExampleFile }} + +After the successful execution of the above resource block, the storage controller would have been configured. More details can be verified through state file. +{{- end }} + +{{ .SchemaMarkdown | trimspace }} + +{{ if .HasImport -}} +## Import + +Import is supported using the following syntax: + +{{codefile "shell" .ImportFile }} + +1. This will import the Storage Controller configuration into your Terraform state. +2. After successful import, you can run terraform state list to ensure the resource has been imported successfully. +3. Now, you can fill in the resource block with the appropriate arguments and settings that match the imported resource's real-world configuration. +4. Execute terraform plan to see if your configuration and the imported resource are in sync. Make adjustments if needed. +5. Finally, execute terraform apply to bring the resource fully under Terraform's management. +6. Now, the resource which was not part of terraform became part of Terraform managed infrastructure. + +{{- end }}