Skip to main content

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

NameRequired / OptionalTypeDescription
pattern_idRequiredStringPattern 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_ruleRequiredStringIdentifies when to activate the configuration. This can be the following value.
  • deferredActivation. (default) Activates management-controller settings but do not restart the server. UEFI settings are activated after the next restart of the server.
device_idsRequiredArray of stringsList 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_idsRequiredArray of stringsList 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

NameTypeDescription
textStringStatus message
descriptionIntegerStatus description
The following example is returned if the request is successful.
{
"text": "The request was launched successfully.",
"description": "The request was launched successfully."
}