-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95e0b97
commit 11066f0
Showing
10 changed files
with
575 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "redfish_manager_reset Resource - terraform-provider-redfish" | ||
subcategory: "" | ||
description: |- | ||
Resource to reset the iDRAC. | ||
--- | ||
|
||
# redfish_manager_reset (Resource) | ||
|
||
Resource to reset the iDRAC. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
/* | ||
Copyright (c) 2023 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. | ||
*/ | ||
resource "redfish_manager_reset" "manager_reset" { | ||
for_each = var.rack1 | ||
redfish_server { | ||
user = each.value.user | ||
password = each.value.password | ||
endpoint = each.value.endpoint | ||
ssl_insecure = each.value.ssl_insecure | ||
} | ||
id = "iDRAC.Embedded.1" | ||
reset_type = "GracefulRestart" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The value of the Id property of the Manager resource | ||
- `reset_type` (String) The type of the reset operation to be performed. Accepted value: GracefulRestart | ||
|
||
### Optional | ||
|
||
- `redfish_server` (Block List) List of server BMCs and their respective user credentials (see [below for nested schema](#nestedblock--redfish_server)) | ||
|
||
<a id="nestedblock--redfish_server"></a> | ||
### Nested Schema for `redfish_server` | ||
|
||
Required: | ||
|
||
- `endpoint` (String) Server BMC IP address or hostname | ||
|
||
Optional: | ||
|
||
- `password` (String, Sensitive) User password for login | ||
- `ssl_insecure` (Boolean) This field indicates whether the SSL/TLS certificate must be verified or not | ||
- `user` (String) User name for login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
Copyright (c) 2023 Dell Inc., or its subsidiaries. All Rights Reserved. | ||
Licensed under the Mozilla Public License Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://mozilla.org/MPL/2.0/ | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
terraform { | ||
required_providers { | ||
redfish = { | ||
version = "1.1.0" | ||
source = "registry.terraform.io/dell/redfish" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
Copyright (c) 2023 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. | ||
*/ | ||
|
||
resource "redfish_manager_reset" "manager_reset" { | ||
for_each = var.rack1 | ||
|
||
redfish_server { | ||
user = each.value.user | ||
password = each.value.password | ||
endpoint = each.value.endpoint | ||
ssl_insecure = each.value.ssl_insecure | ||
} | ||
|
||
id = "iDRAC.Embedded.1" | ||
reset_type = "GracefulRestart" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
Copyright (c) 2023 Dell Inc., or its subsidiaries. All Rights Reserved. | ||
Licensed under the Mozilla Public License Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://mozilla.org/MPL/2.0/ | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
rack1 = { | ||
"my-server-2" = { | ||
user = "admin" | ||
password = "passw0rd" | ||
endpoint = "https://my-server-1.myawesomecompany.org" | ||
ssl_insecure = true | ||
}, | ||
"my-server-2" = { | ||
user = "admin" | ||
password = "passw0rd" | ||
endpoint = "https://my-server-2.myawesomecompany.org" | ||
ssl_insecure = true | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
Copyright (c) 2023 Dell Inc., or its subsidiaries. All Rights Reserved. | ||
Licensed under the Mozilla Public License Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://mozilla.org/MPL/2.0/ | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
variable "rack1" { | ||
type = map(object({ | ||
user = string | ||
password = string | ||
endpoint = string | ||
ssl_insecure = bool | ||
})) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package models | ||
|
||
import ( | ||
"github.com/hashicorp/terraform-plugin-framework/types" | ||
) | ||
|
||
// RedfishManagerReset to construct terraform schema for manager reset resource. | ||
type RedfishManagerReset struct { | ||
Id types.String `tfsdk:"id"` | ||
ResetType types.String `tfsdk:"reset_type"` | ||
RedfishServer []RedfishServer `tfsdk:"redfish_server"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.