Deploying a server-configuration pattern to servers
Use this definition to deploy the assigned server-configuration pattern to one or more servers.
A job is created to complete this request.
Usage
resource "lxco_configPattern" "deployPattern" {
pattern_action = string
group_ids = array of strings
device_ids = array of strings
activation_rule = string
}
output "deployPattern" {
value = lxco_configPattern.deployPattern
}
Example
The following example deploys the assigned server-configuration pattern to a server using deferred activation.
terraform {
required_providers {
lxco = {
version = "0.1"
source = "lenovo.com/xclarity/lxco"
}
}
}
provider "lxco" {
host = "192.0.2.0"
# username = ""
# password = ""
}
# Deploy the assigned server-configuration pattern to one or more servers, and return the results
resource "lxco_configPattern" "deployPattern" {
pattern_action = "deployPattern"
group_ids = []
device_ids = ["80CE6AB8FF7D11E685CB819F6B26BCF8"]
activation_rule = "DeferredActivation"
}
output "deployPattern" {
value = lxco_configPattern.deployPattern
}
Inputs
Name | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
pattern_id | Required | String | Pattern ID If a pattern ID is specified, the pattern is assigned to the devices. If a set to null, the current pattern is unassigned from the devices. | ||
activation_rule | Required | String | Identifies when to activate the configuration. This can be the following value.
| ||
device_ids | Required | Array of strings | List of UUIDs of the servers to which to assign the pattern If group_ids and device_ids attributes are both set to an empty array, the pattern is assigned to all devices. | ||
group_ids | Required | Array of strings | List of IDs of device groups that contains one or more servers to which to assign or unassign the pattern The pattern is assigned to each server in the specified groups. Devices of other types in the group are ignored. If group_ids and device_ids attributes are both set to an empty array, the pattern is assigned to all devices. |
Outputs
Name | Type | Description | ||
---|---|---|---|---|
text | String | Status message | ||
description | Integer | Status description |
The following example is returned if the request is successful.
{
"text": "The request was launched successfully.",
"description": "The request was launched successfully."
}
Give documentation feedback