diff --git a/docs/data-sources/bios.md b/docs/data-sources/bios.md index 38086067..d065bc53 100644 --- a/docs/data-sources/bios.md +++ b/docs/data-sources/bios.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ data "redfish_bios" "bios" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/data-sources/dell_idrac_attributes.md b/docs/data-sources/dell_idrac_attributes.md index 6c218db0..dede9c0e 100644 --- a/docs/data-sources/dell_idrac_attributes.md +++ b/docs/data-sources/dell_idrac_attributes.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ data "redfish_dell_idrac_attributes" "idrac" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/data-sources/directory_service_auth_provider.md b/docs/data-sources/directory_service_auth_provider.md index 958c182e..d342072e 100644 --- a/docs/data-sources/directory_service_auth_provider.md +++ b/docs/data-sources/directory_service_auth_provider.md @@ -34,6 +34,11 @@ data "redfish_directory_service_auth_provider" "ds_auth" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/data-sources/firmware_inventory.md b/docs/data-sources/firmware_inventory.md index 06a639fe..77bc7e44 100644 --- a/docs/data-sources/firmware_inventory.md +++ b/docs/data-sources/firmware_inventory.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ data "redfish_firmware_inventory" "inventory" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/data-sources/network.md b/docs/data-sources/network.md index 18f07e58..271b2591 100644 --- a/docs/data-sources/network.md +++ b/docs/data-sources/network.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ data "redfish_network" "nic_example" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/data-sources/storage.md b/docs/data-sources/storage.md index 3a3cb870..9554b3d0 100644 --- a/docs/data-sources/storage.md +++ b/docs/data-sources/storage.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ data "redfish_storage" "storage" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/data-sources/storage_controller.md b/docs/data-sources/storage_controller.md index 667469df..3f305849 100644 --- a/docs/data-sources/storage_controller.md +++ b/docs/data-sources/storage_controller.md @@ -34,6 +34,11 @@ data "redfish_storage_controller" "storage_controller_example" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/data-sources/system_boot.md b/docs/data-sources/system_boot.md index ade29d47..6b3f5212 100644 --- a/docs/data-sources/system_boot.md +++ b/docs/data-sources/system_boot.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ data "redfish_system_boot" "system_boot" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/data-sources/virtual_media.md b/docs/data-sources/virtual_media.md index 39042121..c873078b 100644 --- a/docs/data-sources/virtual_media.md +++ b/docs/data-sources/virtual_media.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ data "redfish_virtual_media" "vm" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/guides/enhancement_for_password_managemant.md b/docs/guides/enhancement_for_password_managemant.md new file mode 100644 index 00000000..fa537ab5 --- /dev/null +++ b/docs/guides/enhancement_for_password_managemant.md @@ -0,0 +1,54 @@ +--- +# 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. +page_title: "Enhancement for password managemant" +title: "Enhancement for password managemant" +linkTitle: "Enhancement for password managemant" +--- +Enhancements to password management +The guide provides a terraform configuration of using `redfish_alias` to enhance password managemant. +The purpose of this enhancement is that when the user password changes, we only need to update the password value in the locals variable, and we no longer need to manually edit the state files to change the old root password to new password. +All we need to do is introduce `redfish_servers` to the provider, while introducing `redfish_alias` to resource/datasource's `redfish_server`. + +## Example + +```terraform +provider "redfish" { + # Add `redfish_servers` to provider. This is required when resource/datasource's `redfish_alias` is not null + redfish_servers = var.rack1 +} + +resource "redfish_user_account" "rr" { + for_each = var.rack1 + + redfish_server { + # Add `redfish_alias` to resource/datasource + redfish_alias = each.key + } + + user_id = "4" + username = "test" + password = "Test@123" + role_id = "Operator" + enabled = true +} +``` + +## Example for Import +```terraform +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_user_account.rr "{\"id\":\"\",\"redfish_alias\":\"\"}" +``` \ No newline at end of file diff --git a/docs/resources/bios.md b/docs/resources/bios.md index fecfc797..6f7688e1 100644 --- a/docs/resources/bios.md +++ b/docs/resources/bios.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ resource "redfish_bios" "bios" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -222,6 +234,10 @@ limitations under the License. */ terraform import redfish_bios.bios "{\"username\":\"\",\"password\":\"\",\"endpoint\":\"\",\"ssl_insecure\":}" + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_bios.bios "{\"redfish_alias\":\"\"}" ``` 1. This will import the storage volume instance with specified ID into your Terraform state. diff --git a/docs/resources/boot_order.md b/docs/resources/boot_order.md index 14ad6407..029e86ce 100644 --- a/docs/resources/boot_order.md +++ b/docs/resources/boot_order.md @@ -121,6 +121,13 @@ terraform { } } } + +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 @@ -146,6 +153,11 @@ resource "redfish_boot_order" "boot" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -242,6 +254,10 @@ limitations under the License. # terraform import redfish_boot_order.boot "{\"username\":\"\",\"password\":\"\",\"endpoint\":\"\",\"ssl_insecure\":}" terraform import redfish_boot_order.boot '{"username":"admin","password":"passw0rd","endpoint":"https://my-server-1.myawesomecompany.org","ssl_insecure":true}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_boot_order.boot '{"redfish_alias":""}' ``` 1. This will import the boot order instance into your Terraform state. diff --git a/docs/resources/boot_source_override.md b/docs/resources/boot_source_override.md index 997a7251..543e58b5 100644 --- a/docs/resources/boot_source_override.md +++ b/docs/resources/boot_source_override.md @@ -123,6 +123,13 @@ terraform { } } } + +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 @@ -148,6 +155,11 @@ resource "redfish_boot_source_override" "boot" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/resources/certificate.md b/docs/resources/certificate.md index b5500e84..7a04d920 100644 --- a/docs/resources/certificate.md +++ b/docs/resources/certificate.md @@ -129,6 +129,10 @@ terraform { } 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 } ``` @@ -160,6 +164,11 @@ resource "redfish_certificate" "cert" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/resources/dell_idrac_attributes.md b/docs/resources/dell_idrac_attributes.md index 2b44688d..a0a6d310 100644 --- a/docs/resources/dell_idrac_attributes.md +++ b/docs/resources/dell_idrac_attributes.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ resource "redfish_dell_idrac_attributes" "idrac" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -218,4 +230,8 @@ terraform import redfish_dell_idrac_attributes.idrac '{"username":"","pass # import list of idrac attributes terraform import redfish_dell_idrac_attributes.idrac '{"username":"","password":"","endpoint":"","ssl_insecure":, "attributes":["Users.2.UserName"]}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_dell_idrac_attributes.idrac '{"redfish_alias":""}' ``` diff --git a/docs/resources/dell_lc_attributes.md b/docs/resources/dell_lc_attributes.md index 344ea5a5..fb650ac3 100644 --- a/docs/resources/dell_lc_attributes.md +++ b/docs/resources/dell_lc_attributes.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ resource "redfish_dell_lc_attributes" "lc" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -213,4 +225,8 @@ terraform import redfish_dell_lc_attributes.lc '{"username":"","password": # import list of LC attributes terraform import redfish_dell_lc_attributes.lc '{"username":"","password":"","endpoint":"","ssl_insecure":, "attributes":["LCAttributes.1.IgnoreCertWarning"]}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_dell_lc_attributes.lc '{"redfish_alias":""}' ``` diff --git a/docs/resources/dell_system_attributes.md b/docs/resources/dell_system_attributes.md index 481c9cf3..fb62eb72 100644 --- a/docs/resources/dell_system_attributes.md +++ b/docs/resources/dell_system_attributes.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ resource "redfish_dell_system_attributes" "system" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -213,4 +225,8 @@ terraform import redfish_dell_system_attributes.system '{"username":"","pa # import list of System attributes terraform import redfish_dell_system_attributes.system '{"username":"","password":"","endpoint":"","ssl_insecure":, "attributes":["ServerPwr.1.PSPFCEnabled"]}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_dell_system_attributes.system '{"redfish_alias":""}' ``` diff --git a/docs/resources/directory_service_auth_provider.md b/docs/resources/directory_service_auth_provider.md index cbd0a186..758bd9a7 100644 --- a/docs/resources/directory_service_auth_provider.md +++ b/docs/resources/directory_service_auth_provider.md @@ -44,6 +44,11 @@ resource "redfish_directory_service_auth_provider" "ds_auth" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -284,4 +289,8 @@ limitations under the License. */ terraform import redfish_directory_service_auth_provider.ds_auth '{"username":"","password":"","endpoint":"","ssl_insecure":}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_directory_service_auth_provider.ds_auth '{"redfish_alias":""}' ``` diff --git a/docs/resources/idrac_firmware_update.md b/docs/resources/idrac_firmware_update.md index 158e9c14..0a3062d7 100644 --- a/docs/resources/idrac_firmware_update.md +++ b/docs/resources/idrac_firmware_update.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -150,6 +157,11 @@ resource "redfish_idrac_firmware_update" "update" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/resources/idrac_server_configuration_profile_export.md b/docs/resources/idrac_server_configuration_profile_export.md index 04da1d91..4487b3f8 100644 --- a/docs/resources/idrac_server_configuration_profile_export.md +++ b/docs/resources/idrac_server_configuration_profile_export.md @@ -130,6 +130,13 @@ terraform { } } } + +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 @@ -158,6 +165,11 @@ resource "redfish_idrac_server_configuration_profile_export" "share_type_local" for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -178,6 +190,11 @@ resource "redfish_idrac_server_configuration_profile_export" "share_type_nfs" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -201,6 +218,11 @@ resource "redfish_idrac_server_configuration_profile_export" "share_type_cifs" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -226,6 +248,11 @@ resource "redfish_idrac_server_configuration_profile_export" "share_type_https" for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -249,6 +276,11 @@ resource "redfish_idrac_server_configuration_profile_export" "share_type_http" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/resources/idrac_server_configuration_profile_import.md b/docs/resources/idrac_server_configuration_profile_import.md index b0f2b966..46f55918 100644 --- a/docs/resources/idrac_server_configuration_profile_import.md +++ b/docs/resources/idrac_server_configuration_profile_import.md @@ -130,6 +130,13 @@ terraform { } } } + +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 @@ -159,6 +166,11 @@ resource "redfish_idrac_server_configuration_profile_import" "share_type_local" for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -180,6 +192,11 @@ resource "redfish_idrac_server_configuration_profile_import" "share_type_nfs" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -203,6 +220,11 @@ resource "redfish_idrac_server_configuration_profile_import" "share_type_cifs" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -228,6 +250,11 @@ resource "redfish_idrac_server_configuration_profile_import" "share_type_https" for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -251,6 +278,11 @@ resource "redfish_idrac_server_configuration_profile_import" "share_type_http" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/resources/manager_reset.md b/docs/resources/manager_reset.md index bbcaee3f..21a237bb 100644 --- a/docs/resources/manager_reset.md +++ b/docs/resources/manager_reset.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ resource "redfish_manager_reset" "manager_reset" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/resources/network_adapter.md b/docs/resources/network_adapter.md index 99fe34d7..c75942bc 100644 --- a/docs/resources/network_adapter.md +++ b/docs/resources/network_adapter.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -145,6 +152,11 @@ resource "redfish_network_adapter" "nic" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -480,6 +492,10 @@ terraform import redfish_network_adapter.nic '{"network_adapter_id":"","network_adapter_id":"","network_device_function_id":"","username":"","password":"","endpoint":"","ssl_insecure":}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_network_adapter.nic '{"network_adapter_id":"","network_device_function_id":"","redfish_alias":""}' ``` 1. This will import the Sever NIC configuration into your Terraform state. diff --git a/docs/resources/power.md b/docs/resources/power.md index fc45ada5..e666b874 100644 --- a/docs/resources/power.md +++ b/docs/resources/power.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ resource "redfish_power" "system_power" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/resources/simple_update.md b/docs/resources/simple_update.md index b2262a3a..18734bad 100644 --- a/docs/resources/simple_update.md +++ b/docs/resources/simple_update.md @@ -119,6 +119,13 @@ terraform { } } } + +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 @@ -144,6 +151,11 @@ resource "redfish_simple_update" "update" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/docs/resources/storage_controller.md b/docs/resources/storage_controller.md index e117bc75..0c43e74e 100644 --- a/docs/resources/storage_controller.md +++ b/docs/resources/storage_controller.md @@ -35,6 +35,11 @@ resource "redfish_storage_controller" "storage_controller_example" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -299,4 +304,8 @@ terraform import redfish_storage_controller.storage_controller_example '{"storag # terraform import with system_id terraform import redfish_storage_controller.storage_controller_example '{"system_id":"","storage_id":"","controller_id":"","username":"","password":"","endpoint":"","ssl_insecure":}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# 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":""}' ``` diff --git a/docs/resources/storage_volume.md b/docs/resources/storage_volume.md index 1d384120..237bb6f6 100644 --- a/docs/resources/storage_volume.md +++ b/docs/resources/storage_volume.md @@ -121,6 +121,13 @@ terraform { } } } + +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 @@ -146,6 +153,11 @@ resource "redfish_storage_volume" "volume" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -281,6 +293,10 @@ limitations under the License. */ terraform import redfish_storage_volume.volume "{\"id\":\"\",\"username\":\"\",\"password\":\"\",\"endpoint\":\"\",\"ssl_insecure\":}" + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_storage_volume.volume "{\"id\":\"\",\"redfish_alias\":\"\"}" ``` 1. This will import the storage volume instance with specified ID into your Terraform state. diff --git a/docs/resources/user_account.md b/docs/resources/user_account.md index 68652be8..efe8a061 100644 --- a/docs/resources/user_account.md +++ b/docs/resources/user_account.md @@ -237,7 +237,7 @@ terraform import redfish_user_account.rr "{\"id\":\"\",\"username\":\"\",\"redfish_alias\":\"\",\"endpoint\":\"\"}" +terraform import redfish_user_account.rr "{\"id\":\"\",\"redfish_alias\":\"\"}" ``` 1. This will import the user instance with specified ID into your Terraform state. diff --git a/docs/resources/virtual_media.md b/docs/resources/virtual_media.md index 8912fc6f..9e63d785 100644 --- a/docs/resources/virtual_media.md +++ b/docs/resources/virtual_media.md @@ -123,6 +123,10 @@ terraform { } 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 } ``` @@ -149,6 +153,11 @@ resource "redfish_virtual_media" "vm" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -234,6 +243,11 @@ limitations under the License. # terraform import redfish_virtual_media.media "{\"id\":\"\",\"username\":\"\",\"password\":\"\",\"endpoint\":\"\",\"ssl_insecure\":}" terraform import redfish_virtual_media.media '{"id":"/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD","username":"admin","password":"passw0rd","endpoint":"https://my-server-1.myawesomecompany.org","ssl_insecure":true}' + + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_virtual_media.media '{"id":"/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD","redfish_alias":""}' ``` diff --git a/examples/data-sources/redfish_bios/data-source.tf b/examples/data-sources/redfish_bios/data-source.tf index 5ad1016e..09999888 100644 --- a/examples/data-sources/redfish_bios/data-source.tf +++ b/examples/data-sources/redfish_bios/data-source.tf @@ -19,6 +19,11 @@ data "redfish_bios" "bios" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/data-sources/redfish_bios/provider.tf b/examples/data-sources/redfish_bios/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/data-sources/redfish_bios/provider.tf +++ b/examples/data-sources/redfish_bios/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/data-sources/redfish_dell_idrac_attributes/data-source.tf b/examples/data-sources/redfish_dell_idrac_attributes/data-source.tf index 3ea2d8dd..91f9dd00 100644 --- a/examples/data-sources/redfish_dell_idrac_attributes/data-source.tf +++ b/examples/data-sources/redfish_dell_idrac_attributes/data-source.tf @@ -19,6 +19,11 @@ data "redfish_dell_idrac_attributes" "idrac" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/data-sources/redfish_dell_idrac_attributes/provider.tf b/examples/data-sources/redfish_dell_idrac_attributes/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/data-sources/redfish_dell_idrac_attributes/provider.tf +++ b/examples/data-sources/redfish_dell_idrac_attributes/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/data-sources/redfish_directory_service_auth_provider/data-source.tf b/examples/data-sources/redfish_directory_service_auth_provider/data-source.tf index b7094e69..7230c1f4 100644 --- a/examples/data-sources/redfish_directory_service_auth_provider/data-source.tf +++ b/examples/data-sources/redfish_directory_service_auth_provider/data-source.tf @@ -19,6 +19,11 @@ data "redfish_directory_service_auth_provider" "ds_auth" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/data-sources/redfish_directory_service_auth_provider/provider.tf b/examples/data-sources/redfish_directory_service_auth_provider/provider.tf index 5afaec72..9a63036a 100644 --- a/examples/data-sources/redfish_directory_service_auth_provider/provider.tf +++ b/examples/data-sources/redfish_directory_service_auth_provider/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/data-sources/redfish_firmware_inventory/data-source.tf b/examples/data-sources/redfish_firmware_inventory/data-source.tf index 05960c1d..3332720d 100644 --- a/examples/data-sources/redfish_firmware_inventory/data-source.tf +++ b/examples/data-sources/redfish_firmware_inventory/data-source.tf @@ -19,6 +19,11 @@ data "redfish_firmware_inventory" "inventory" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/data-sources/redfish_firmware_inventory/provider.tf b/examples/data-sources/redfish_firmware_inventory/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/data-sources/redfish_firmware_inventory/provider.tf +++ b/examples/data-sources/redfish_firmware_inventory/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/data-sources/redfish_network/data-source.tf b/examples/data-sources/redfish_network/data-source.tf index 77b88a0f..3ea19f18 100644 --- a/examples/data-sources/redfish_network/data-source.tf +++ b/examples/data-sources/redfish_network/data-source.tf @@ -19,6 +19,11 @@ data "redfish_network" "nic_example" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/data-sources/redfish_network/provider.tf b/examples/data-sources/redfish_network/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/data-sources/redfish_network/provider.tf +++ b/examples/data-sources/redfish_network/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/data-sources/redfish_storage/data-source.tf b/examples/data-sources/redfish_storage/data-source.tf index 909a9ef3..bdf92fad 100644 --- a/examples/data-sources/redfish_storage/data-source.tf +++ b/examples/data-sources/redfish_storage/data-source.tf @@ -19,6 +19,11 @@ data "redfish_storage" "storage" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/data-sources/redfish_storage/provider.tf b/examples/data-sources/redfish_storage/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/data-sources/redfish_storage/provider.tf +++ b/examples/data-sources/redfish_storage/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/data-sources/redfish_storage_controller/data-source.tf b/examples/data-sources/redfish_storage_controller/data-source.tf index 5ddec9a9..f7e913a6 100644 --- a/examples/data-sources/redfish_storage_controller/data-source.tf +++ b/examples/data-sources/redfish_storage_controller/data-source.tf @@ -19,6 +19,11 @@ data "redfish_storage_controller" "storage_controller_example" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/data-sources/redfish_storage_controller/provider.tf b/examples/data-sources/redfish_storage_controller/provider.tf index 19d46cc5..a21173d0 100644 --- a/examples/data-sources/redfish_storage_controller/provider.tf +++ b/examples/data-sources/redfish_storage_controller/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/data-sources/redfish_system_boot/data-source.tf b/examples/data-sources/redfish_system_boot/data-source.tf index 5ba27a24..bd13f5b8 100644 --- a/examples/data-sources/redfish_system_boot/data-source.tf +++ b/examples/data-sources/redfish_system_boot/data-source.tf @@ -19,6 +19,11 @@ data "redfish_system_boot" "system_boot" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/data-sources/redfish_system_boot/provider.tf b/examples/data-sources/redfish_system_boot/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/data-sources/redfish_system_boot/provider.tf +++ b/examples/data-sources/redfish_system_boot/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/data-sources/redfish_virtual_media/data-source.tf b/examples/data-sources/redfish_virtual_media/data-source.tf index e61e2ac7..45fb14e9 100644 --- a/examples/data-sources/redfish_virtual_media/data-source.tf +++ b/examples/data-sources/redfish_virtual_media/data-source.tf @@ -19,6 +19,11 @@ data "redfish_virtual_media" "vm" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/data-sources/redfish_virtual_media/provider.tf b/examples/data-sources/redfish_virtual_media/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/data-sources/redfish_virtual_media/provider.tf +++ b/examples/data-sources/redfish_virtual_media/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_bios/import.sh b/examples/resources/redfish_bios/import.sh index f4db0dd4..27f06ad2 100644 --- a/examples/resources/redfish_bios/import.sh +++ b/examples/resources/redfish_bios/import.sh @@ -15,4 +15,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -terraform import redfish_bios.bios "{\"username\":\"\",\"password\":\"\",\"endpoint\":\"\",\"ssl_insecure\":}" \ No newline at end of file +terraform import redfish_bios.bios "{\"username\":\"\",\"password\":\"\",\"endpoint\":\"\",\"ssl_insecure\":}" + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_bios.bios "{\"redfish_alias\":\"\"}" diff --git a/examples/resources/redfish_bios/provider.tf b/examples/resources/redfish_bios/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/resources/redfish_bios/provider.tf +++ b/examples/resources/redfish_bios/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_bios/resource.tf b/examples/resources/redfish_bios/resource.tf index 145e093c..f2e6a217 100644 --- a/examples/resources/redfish_bios/resource.tf +++ b/examples/resources/redfish_bios/resource.tf @@ -19,6 +19,11 @@ resource "redfish_bios" "bios" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_boot_order/import.sh b/examples/resources/redfish_boot_order/import.sh index f8f61489..0189295d 100644 --- a/examples/resources/redfish_boot_order/import.sh +++ b/examples/resources/redfish_boot_order/import.sh @@ -18,4 +18,8 @@ limitations under the License. # The synatx is: # terraform import redfish_boot_order.boot "{\"username\":\"\",\"password\":\"\",\"endpoint\":\"\",\"ssl_insecure\":}" -terraform import redfish_boot_order.boot '{"username":"admin","password":"passw0rd","endpoint":"https://my-server-1.myawesomecompany.org","ssl_insecure":true}' \ No newline at end of file +terraform import redfish_boot_order.boot '{"username":"admin","password":"passw0rd","endpoint":"https://my-server-1.myawesomecompany.org","ssl_insecure":true}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_boot_order.boot '{"redfish_alias":""}' diff --git a/examples/resources/redfish_boot_order/provider.tf b/examples/resources/redfish_boot_order/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/resources/redfish_boot_order/provider.tf +++ b/examples/resources/redfish_boot_order/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_boot_order/resource.tf b/examples/resources/redfish_boot_order/resource.tf index b2792514..fba912e3 100644 --- a/examples/resources/redfish_boot_order/resource.tf +++ b/examples/resources/redfish_boot_order/resource.tf @@ -19,6 +19,11 @@ resource "redfish_boot_order" "boot" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_boot_source_override/provider.tf b/examples/resources/redfish_boot_source_override/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/resources/redfish_boot_source_override/provider.tf +++ b/examples/resources/redfish_boot_source_override/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_boot_source_override/resource.tf b/examples/resources/redfish_boot_source_override/resource.tf index f7bbbef8..caaa2e01 100644 --- a/examples/resources/redfish_boot_source_override/resource.tf +++ b/examples/resources/redfish_boot_source_override/resource.tf @@ -19,6 +19,11 @@ resource "redfish_boot_source_override" "boot" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_certificate/provider.tf b/examples/resources/redfish_certificate/provider.tf index e13b5710..6e70f88f 100644 --- a/examples/resources/redfish_certificate/provider.tf +++ b/examples/resources/redfish_certificate/provider.tf @@ -25,4 +25,8 @@ terraform { } 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 } \ No newline at end of file diff --git a/examples/resources/redfish_certificate/resource.tf b/examples/resources/redfish_certificate/resource.tf index 4a7c1025..281267d9 100644 --- a/examples/resources/redfish_certificate/resource.tf +++ b/examples/resources/redfish_certificate/resource.tf @@ -24,6 +24,11 @@ resource "redfish_certificate" "cert" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_dell_idrac_attributes/import.sh b/examples/resources/redfish_dell_idrac_attributes/import.sh index 40249456..7a27a8f5 100644 --- a/examples/resources/redfish_dell_idrac_attributes/import.sh +++ b/examples/resources/redfish_dell_idrac_attributes/import.sh @@ -19,4 +19,8 @@ limitations under the License. terraform import redfish_dell_idrac_attributes.idrac '{"username":"","password":"","endpoint":"","ssl_insecure":}' # import list of idrac attributes -terraform import redfish_dell_idrac_attributes.idrac '{"username":"","password":"","endpoint":"","ssl_insecure":, "attributes":["Users.2.UserName"]}' \ No newline at end of file +terraform import redfish_dell_idrac_attributes.idrac '{"username":"","password":"","endpoint":"","ssl_insecure":, "attributes":["Users.2.UserName"]}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_dell_idrac_attributes.idrac '{"redfish_alias":""}' diff --git a/examples/resources/redfish_dell_idrac_attributes/provider.tf b/examples/resources/redfish_dell_idrac_attributes/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/resources/redfish_dell_idrac_attributes/provider.tf +++ b/examples/resources/redfish_dell_idrac_attributes/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_dell_idrac_attributes/resource.tf b/examples/resources/redfish_dell_idrac_attributes/resource.tf index 0b078de6..3557c734 100644 --- a/examples/resources/redfish_dell_idrac_attributes/resource.tf +++ b/examples/resources/redfish_dell_idrac_attributes/resource.tf @@ -19,6 +19,11 @@ resource "redfish_dell_idrac_attributes" "idrac" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_dell_lc_attributes/import.sh b/examples/resources/redfish_dell_lc_attributes/import.sh index f047f971..0674e588 100644 --- a/examples/resources/redfish_dell_lc_attributes/import.sh +++ b/examples/resources/redfish_dell_lc_attributes/import.sh @@ -19,4 +19,8 @@ limitations under the License. terraform import redfish_dell_lc_attributes.lc '{"username":"","password":"","endpoint":"","ssl_insecure":}' # import list of LC attributes -terraform import redfish_dell_lc_attributes.lc '{"username":"","password":"","endpoint":"","ssl_insecure":, "attributes":["LCAttributes.1.IgnoreCertWarning"]}' \ No newline at end of file +terraform import redfish_dell_lc_attributes.lc '{"username":"","password":"","endpoint":"","ssl_insecure":, "attributes":["LCAttributes.1.IgnoreCertWarning"]}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_dell_lc_attributes.lc '{"redfish_alias":""}' \ No newline at end of file diff --git a/examples/resources/redfish_dell_lc_attributes/provider.tf b/examples/resources/redfish_dell_lc_attributes/provider.tf index 1e58448d..f6cc73f6 100644 --- a/examples/resources/redfish_dell_lc_attributes/provider.tf +++ b/examples/resources/redfish_dell_lc_attributes/provider.tf @@ -23,3 +23,10 @@ terraform { } } } + +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 +} diff --git a/examples/resources/redfish_dell_lc_attributes/resource.tf b/examples/resources/redfish_dell_lc_attributes/resource.tf index d8741b24..8deb6fa0 100644 --- a/examples/resources/redfish_dell_lc_attributes/resource.tf +++ b/examples/resources/redfish_dell_lc_attributes/resource.tf @@ -19,6 +19,11 @@ resource "redfish_dell_lc_attributes" "lc" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_dell_system_attributes/import.sh b/examples/resources/redfish_dell_system_attributes/import.sh index 8c2ee5ef..7584f359 100644 --- a/examples/resources/redfish_dell_system_attributes/import.sh +++ b/examples/resources/redfish_dell_system_attributes/import.sh @@ -19,4 +19,8 @@ limitations under the License. terraform import redfish_dell_system_attributes.system '{"username":"","password":"","endpoint":"","ssl_insecure":}' # import list of System attributes -terraform import redfish_dell_system_attributes.system '{"username":"","password":"","endpoint":"","ssl_insecure":, "attributes":["ServerPwr.1.PSPFCEnabled"]}' \ No newline at end of file +terraform import redfish_dell_system_attributes.system '{"username":"","password":"","endpoint":"","ssl_insecure":, "attributes":["ServerPwr.1.PSPFCEnabled"]}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_dell_system_attributes.system '{"redfish_alias":""}' \ No newline at end of file diff --git a/examples/resources/redfish_dell_system_attributes/provider.tf b/examples/resources/redfish_dell_system_attributes/provider.tf index 1e58448d..f6cc73f6 100644 --- a/examples/resources/redfish_dell_system_attributes/provider.tf +++ b/examples/resources/redfish_dell_system_attributes/provider.tf @@ -23,3 +23,10 @@ terraform { } } } + +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 +} diff --git a/examples/resources/redfish_dell_system_attributes/resource.tf b/examples/resources/redfish_dell_system_attributes/resource.tf index 8f7a79df..d8934fb4 100644 --- a/examples/resources/redfish_dell_system_attributes/resource.tf +++ b/examples/resources/redfish_dell_system_attributes/resource.tf @@ -19,6 +19,11 @@ resource "redfish_dell_system_attributes" "system" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_directory_service_auth_provider/import.sh b/examples/resources/redfish_directory_service_auth_provider/import.sh index 9b8033fb..8ab98f6c 100644 --- a/examples/resources/redfish_directory_service_auth_provider/import.sh +++ b/examples/resources/redfish_directory_service_auth_provider/import.sh @@ -16,3 +16,7 @@ limitations under the License. */ terraform import redfish_directory_service_auth_provider.ds_auth '{"username":"","password":"","endpoint":"","ssl_insecure":}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_directory_service_auth_provider.ds_auth '{"redfish_alias":""}' \ No newline at end of file diff --git a/examples/resources/redfish_directory_service_auth_provider/provider.tf b/examples/resources/redfish_directory_service_auth_provider/provider.tf index 5afaec72..9a63036a 100644 --- a/examples/resources/redfish_directory_service_auth_provider/provider.tf +++ b/examples/resources/redfish_directory_service_auth_provider/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_directory_service_auth_provider/resource.tf b/examples/resources/redfish_directory_service_auth_provider/resource.tf index d0bb4626..99a79046 100644 --- a/examples/resources/redfish_directory_service_auth_provider/resource.tf +++ b/examples/resources/redfish_directory_service_auth_provider/resource.tf @@ -29,6 +29,11 @@ resource "redfish_directory_service_auth_provider" "ds_auth" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_idrac_firmware_update/provider.tf b/examples/resources/redfish_idrac_firmware_update/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/resources/redfish_idrac_firmware_update/provider.tf +++ b/examples/resources/redfish_idrac_firmware_update/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_idrac_firmware_update/resource.tf b/examples/resources/redfish_idrac_firmware_update/resource.tf index e2d03e7c..84dc6ea3 100644 --- a/examples/resources/redfish_idrac_firmware_update/resource.tf +++ b/examples/resources/redfish_idrac_firmware_update/resource.tf @@ -25,6 +25,11 @@ resource "redfish_idrac_firmware_update" "update" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint 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 498c9045..6e70f88f 100644 --- a/examples/resources/redfish_idrac_server_configuration_profile_export/provider.tf +++ b/examples/resources/redfish_idrac_server_configuration_profile_export/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_idrac_server_configuration_profile_export/resource.tf b/examples/resources/redfish_idrac_server_configuration_profile_export/resource.tf index 187b91e1..4b47b998 100644 --- a/examples/resources/redfish_idrac_server_configuration_profile_export/resource.tf +++ b/examples/resources/redfish_idrac_server_configuration_profile_export/resource.tf @@ -22,6 +22,11 @@ resource "redfish_idrac_server_configuration_profile_export" "share_type_local" for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -42,6 +47,11 @@ resource "redfish_idrac_server_configuration_profile_export" "share_type_nfs" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -65,6 +75,11 @@ resource "redfish_idrac_server_configuration_profile_export" "share_type_cifs" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -90,6 +105,11 @@ resource "redfish_idrac_server_configuration_profile_export" "share_type_https" for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -113,6 +133,11 @@ resource "redfish_idrac_server_configuration_profile_export" "share_type_http" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint 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 498c9045..6e70f88f 100644 --- a/examples/resources/redfish_idrac_server_configuration_profile_import/provider.tf +++ b/examples/resources/redfish_idrac_server_configuration_profile_import/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_idrac_server_configuration_profile_import/resource.tf b/examples/resources/redfish_idrac_server_configuration_profile_import/resource.tf index 8faf6d8b..de3f3a01 100644 --- a/examples/resources/redfish_idrac_server_configuration_profile_import/resource.tf +++ b/examples/resources/redfish_idrac_server_configuration_profile_import/resource.tf @@ -23,6 +23,11 @@ resource "redfish_idrac_server_configuration_profile_import" "share_type_local" for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -44,6 +49,11 @@ resource "redfish_idrac_server_configuration_profile_import" "share_type_nfs" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -67,6 +77,11 @@ resource "redfish_idrac_server_configuration_profile_import" "share_type_cifs" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -92,6 +107,11 @@ resource "redfish_idrac_server_configuration_profile_import" "share_type_https" for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint @@ -115,6 +135,11 @@ resource "redfish_idrac_server_configuration_profile_import" "share_type_http" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_manager_reset/provider.tf b/examples/resources/redfish_manager_reset/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/resources/redfish_manager_reset/provider.tf +++ b/examples/resources/redfish_manager_reset/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_manager_reset/resource.tf b/examples/resources/redfish_manager_reset/resource.tf index aed7671d..5b832966 100644 --- a/examples/resources/redfish_manager_reset/resource.tf +++ b/examples/resources/redfish_manager_reset/resource.tf @@ -19,6 +19,11 @@ resource "redfish_manager_reset" "manager_reset" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_network_adapter/import.sh b/examples/resources/redfish_network_adapter/import.sh index 740d87f9..dde30cd2 100644 --- a/examples/resources/redfish_network_adapter/import.sh +++ b/examples/resources/redfish_network_adapter/import.sh @@ -20,3 +20,7 @@ terraform import redfish_network_adapter.nic '{"network_adapter_id":"","network_adapter_id":"","network_device_function_id":"","username":"","password":"","endpoint":"","ssl_insecure":}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_network_adapter.nic '{"network_adapter_id":"","network_device_function_id":"","redfish_alias":""}' \ No newline at end of file diff --git a/examples/resources/redfish_network_adapter/provider.tf b/examples/resources/redfish_network_adapter/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/resources/redfish_network_adapter/provider.tf +++ b/examples/resources/redfish_network_adapter/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_network_adapter/resource.tf b/examples/resources/redfish_network_adapter/resource.tf index a370278e..f30d0614 100644 --- a/examples/resources/redfish_network_adapter/resource.tf +++ b/examples/resources/redfish_network_adapter/resource.tf @@ -20,6 +20,11 @@ resource "redfish_network_adapter" "nic" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_power/provider.tf b/examples/resources/redfish_power/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/resources/redfish_power/provider.tf +++ b/examples/resources/redfish_power/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_power/resource.tf b/examples/resources/redfish_power/resource.tf index b4dce793..c739a00d 100644 --- a/examples/resources/redfish_power/resource.tf +++ b/examples/resources/redfish_power/resource.tf @@ -19,6 +19,11 @@ resource "redfish_power" "system_power" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_simple_update/provider.tf b/examples/resources/redfish_simple_update/provider.tf index 498c9045..6e70f88f 100644 --- a/examples/resources/redfish_simple_update/provider.tf +++ b/examples/resources/redfish_simple_update/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_simple_update/resource.tf b/examples/resources/redfish_simple_update/resource.tf index bd31e394..36826bf5 100644 --- a/examples/resources/redfish_simple_update/resource.tf +++ b/examples/resources/redfish_simple_update/resource.tf @@ -19,6 +19,11 @@ resource "redfish_simple_update" "update" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_storage_controller/import.sh b/examples/resources/redfish_storage_controller/import.sh index 068508ee..ea36ae46 100644 --- a/examples/resources/redfish_storage_controller/import.sh +++ b/examples/resources/redfish_storage_controller/import.sh @@ -20,3 +20,7 @@ terraform import redfish_storage_controller.storage_controller_example '{"storag # terraform import with system_id terraform import redfish_storage_controller.storage_controller_example '{"system_id":"","storage_id":"","controller_id":"","username":"","password":"","endpoint":"","ssl_insecure":}' + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# 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":""}' \ No newline at end of file diff --git a/examples/resources/redfish_storage_controller/provider.tf b/examples/resources/redfish_storage_controller/provider.tf index 5afaec72..9a63036a 100644 --- a/examples/resources/redfish_storage_controller/provider.tf +++ b/examples/resources/redfish_storage_controller/provider.tf @@ -22,4 +22,11 @@ terraform { 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 } \ No newline at end of file diff --git a/examples/resources/redfish_storage_controller/resource.tf b/examples/resources/redfish_storage_controller/resource.tf index bf921eb5..71094e35 100644 --- a/examples/resources/redfish_storage_controller/resource.tf +++ b/examples/resources/redfish_storage_controller/resource.tf @@ -20,6 +20,11 @@ resource "redfish_storage_controller" "storage_controller_example" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_storage_volume/import.sh b/examples/resources/redfish_storage_volume/import.sh index 7e9fb344..d85bf460 100644 --- a/examples/resources/redfish_storage_volume/import.sh +++ b/examples/resources/redfish_storage_volume/import.sh @@ -15,4 +15,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -terraform import redfish_storage_volume.volume "{\"id\":\"\",\"username\":\"\",\"password\":\"\",\"endpoint\":\"\",\"ssl_insecure\":}" \ No newline at end of file +terraform import redfish_storage_volume.volume "{\"id\":\"\",\"username\":\"\",\"password\":\"\",\"endpoint\":\"\",\"ssl_insecure\":}" + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_storage_volume.volume "{\"id\":\"\",\"redfish_alias\":\"\"}" \ No newline at end of file diff --git a/examples/resources/redfish_storage_volume/provider.tf b/examples/resources/redfish_storage_volume/provider.tf index 1e58448d..f6cc73f6 100644 --- a/examples/resources/redfish_storage_volume/provider.tf +++ b/examples/resources/redfish_storage_volume/provider.tf @@ -23,3 +23,10 @@ terraform { } } } + +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 +} diff --git a/examples/resources/redfish_storage_volume/resource.tf b/examples/resources/redfish_storage_volume/resource.tf index 9b374a5f..78b25ef6 100644 --- a/examples/resources/redfish_storage_volume/resource.tf +++ b/examples/resources/redfish_storage_volume/resource.tf @@ -19,6 +19,11 @@ resource "redfish_storage_volume" "volume" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/examples/resources/redfish_user_account/import.sh b/examples/resources/redfish_user_account/import.sh index 51987073..27a91bf6 100644 --- a/examples/resources/redfish_user_account/import.sh +++ b/examples/resources/redfish_user_account/import.sh @@ -19,4 +19,4 @@ terraform import redfish_user_account.rr "{\"id\":\"\",\"username\":\"\",\"redfish_alias\":\"\",\"endpoint\":\"\"}" \ No newline at end of file +terraform import redfish_user_account.rr "{\"id\":\"\",\"redfish_alias\":\"\"}" \ No newline at end of file diff --git a/examples/resources/redfish_virtual_media/import.sh b/examples/resources/redfish_virtual_media/import.sh index 5046f90c..4ed17e39 100644 --- a/examples/resources/redfish_virtual_media/import.sh +++ b/examples/resources/redfish_virtual_media/import.sh @@ -19,3 +19,8 @@ limitations under the License. # terraform import redfish_virtual_media.media "{\"id\":\"\",\"username\":\"\",\"password\":\"\",\"endpoint\":\"\",\"ssl_insecure\":}" terraform import redfish_virtual_media.media '{"id":"/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD","username":"admin","password":"passw0rd","endpoint":"https://my-server-1.myawesomecompany.org","ssl_insecure":true}' + + +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_virtual_media.media '{"id":"/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD","redfish_alias":""}' \ No newline at end of file diff --git a/examples/resources/redfish_virtual_media/provider.tf b/examples/resources/redfish_virtual_media/provider.tf index e13b5710..6e70f88f 100644 --- a/examples/resources/redfish_virtual_media/provider.tf +++ b/examples/resources/redfish_virtual_media/provider.tf @@ -25,4 +25,8 @@ terraform { } 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 } \ No newline at end of file diff --git a/examples/resources/redfish_virtual_media/resource.tf b/examples/resources/redfish_virtual_media/resource.tf index 0b525dcb..b26000e1 100644 --- a/examples/resources/redfish_virtual_media/resource.tf +++ b/examples/resources/redfish_virtual_media/resource.tf @@ -19,6 +19,11 @@ resource "redfish_virtual_media" "vm" { for_each = var.rack1 redfish_server { + # Alias name for server BMCs. The key in provider's `redfish_servers` map + # `redfish_alias` is used to align with enhancements to password management. + # When using redfish_alias, provider's `redfish_servers` is required. + redfish_alias = each.key + user = each.value.user password = each.value.password endpoint = each.value.endpoint diff --git a/templates/guides/enhancement_for_password_managemant.md b/templates/guides/enhancement_for_password_managemant.md new file mode 100644 index 00000000..fa537ab5 --- /dev/null +++ b/templates/guides/enhancement_for_password_managemant.md @@ -0,0 +1,54 @@ +--- +# 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. +page_title: "Enhancement for password managemant" +title: "Enhancement for password managemant" +linkTitle: "Enhancement for password managemant" +--- +Enhancements to password management +The guide provides a terraform configuration of using `redfish_alias` to enhance password managemant. +The purpose of this enhancement is that when the user password changes, we only need to update the password value in the locals variable, and we no longer need to manually edit the state files to change the old root password to new password. +All we need to do is introduce `redfish_servers` to the provider, while introducing `redfish_alias` to resource/datasource's `redfish_server`. + +## Example + +```terraform +provider "redfish" { + # Add `redfish_servers` to provider. This is required when resource/datasource's `redfish_alias` is not null + redfish_servers = var.rack1 +} + +resource "redfish_user_account" "rr" { + for_each = var.rack1 + + redfish_server { + # Add `redfish_alias` to resource/datasource + redfish_alias = each.key + } + + user_id = "4" + username = "test" + password = "Test@123" + role_id = "Operator" + enabled = true +} +``` + +## Example for Import +```terraform +# terraform import with redfish_alias. When using redfish_alias, provider's `redfish_servers` is required. +# redfish_alias is used to align with enhancements to password management. +terraform import redfish_user_account.rr "{\"id\":\"\",\"redfish_alias\":\"\"}" +``` \ No newline at end of file