Skip to main content

Creating a server-configuration pattern

Use this definition to create a server-configuration pattern.

A job is created to complete this request.

Usage

resource "lxco_configPattern" "createPattern" { 
pattern_action = string
name = string
description = string
device_id = string
type = "learn"
}

output "createPattern" {
value = lxco_configPattern.createPattern
}

Example

The following example creates a server-configuration pattern by learning the configuration settings of a server.
terraform {
required_providers {
lxco = {
version = "0.1"
source = "lenovo.com/xclarity/lxco"
}
}
}

provider "lxco" {
host = "192.0.2.0"
# username = ""
# password = ""
}

# Learns the server-configuration pattern of a specific server, and return the results
resource "lxco_configPattern" "createPattern" {
pattern_action = "createPattern"
name = "Test-01 pattern"
description = "Configuration for SR950 servers"
device_id = "80CE6AB8FF7D11E685CB819F6B26BCF8"
type = "learn"
}

output "createPattern" {
value = lxco_configPattern.createPattern
}

Inputs

NameRequired / OptionalTypeDescription
nameRequiredStringPattern name
descriptionOptionalStringPattern description
device_idRequiredStringUUID of the device for which you want to learn configuration settings
typeRequiredStringPattern type. This value is always learn.

Outputs

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