This document version is no longer actively maintained.
The site that you are currently viewing is an archived snapshot.
For up-to-date documentation, see the latest version.
ome_deployment (Resource)
Resource for managing template deployment on OpenManage Enterprise.
Note: Atleast one of
ref_template_nameandref_template_idand exactly one ofdevice_idsanddevice_servicetagsare required.
Example Usage
# Deploy template using Device Service tags
resource "ome_deployment" "deploy-template-1" {
template_name = "deploy-template-1"
device_servicetags = ["MXL1234", "MXL1235"]
job_retry_count = 30
sleep_interval = 10
}
# Deploy template using Device Id's
resource "ome_deployment" "deploy-template-2" {
template_name = "deploy-template-2"
device_ids = [10001, 10002]
}
# Get Deviceid's or servicetags from a specified list of groups
data "ome_groupdevices_info" "gd" {
device_group_names = ["WINDOWS"]
}
# Deploy template for group by fetching the device ids using data sources
resource "ome_deployment" "deploy-template-3" {
template_name = "deploy-template-3"
device_ids = data.ome_groupdevices_info.gd.device_ids
}
# Deploy template using Device Service tags with Schedule
resource "ome_deployment" "deploy-template-4" {
template_name = "deploy-template-4"
device_servicetags = ["MXL1234"]
run_later = true
cron = "0 45 12 19 10 ? 2022"
}
# Deploy template using Device ids and deploy device attributes
resource "ome_deployment" "deploy-template-5" {
template_name = "deploy-template-5"
device_ids = [10001, 10002]
device_attributes = [
{
device_servicetags = ["MXL12345", "MXL23456"]
attributes = [
{
attribute_id = 1197967
display_name = "ServerTopology 1 Aisle Name"
value = "aisle updated value"
is_ignored = false
}
]
}
]
}
# Deploy template using Device ids and boot to network iso
resource "ome_deployment" "deploy-template-6" {
template_name = "deploy-template-6"
device_ids = [10001, 10002]
boot_to_network_iso = {
boot_to_network = true
share_type = "CIFS"
iso_timeout = 240
iso_path = "/cifsshare/unattended/unattended_rocky8.6.iso"
share_detail = {
ip_address = "192.168.0.2"
share_name = ""
work_group = ""
user = "username"
password = "password"
}
}
job_retry_count = 30
}
# Deploy template using Device ids by changing the job_retry_count and sleep_interval and ignore the same during updates
resource "ome_deployment" "deploy-template-7" {
device_servicetags = ["MXL1234"]
job_retry_count = 30
sleep_interval = 10
lifecycle {
ignore_changes = [
job_retry_count,
sleep_interval
]
}
}
# Deploy template using Device service tags and groupnames
resource "ome_deployment" "deploy-template-8" {
template_id = 614
device_servicetags = concat(data.ome_groupdevices_info.gd.device_servicetags, ["MXL1235"])
}
Schema
Optional
boot_to_network_iso(Object) Boot To Network ISO deployment details. (see below for nested schema)cron(String) Cron to schedule the deployment task. Cron expression should be of future datetime.device_attributes(List of Object) List of template attributes associated with the target devices for deploymnent. (see below for nested schema)device_ids(Set of Number) List of the device id(s). Conflicts withdevice_servicetags.device_servicetags(Set of String) List of the device servicetags. Conflicts withdevice_ids.forced_shutdown(Boolean) Force shutdown after deployment.job_retry_count(Number) Number of times the job has to be polled to get the final status of the resource. Default value is20.options_continue_on_warning(Boolean) Continue to run the job on warnings.options_precheck_only(Boolean) Option to precheckoptions_strict_checking_vlan(Boolean) Checks the strict association of vlan.options_time_to_wait_before_shutdown(Number) Option to specify the time to wait before shutdown in seconds. Default and minimum value is 300 and maximum is 3600 seconds respectively. Default value is300.power_state_off(Boolean) End power state of a target devices. Default power state is ON. Make it true to switch it to OFF state.run_later(Boolean) Provides options to schedule the deployment task immediately, or at a specified time.sleep_interval(Number) Sleep time interval for job polling in seconds. Default value is60.template_id(Number) ID of the existing template. If a template with this ID is found,template_namewill be ignored. Cannot be updated.template_name(String) Name of the existing template. Cannot be updated.
Read-Only
id(String) ID of the deploy resource.
Nested Schema for boot_to_network_iso
Optional:
boot_to_network(Boolean)iso_path(String)iso_timeout(Number)share_detail(Object) (see below for nested schema)share_type(String)
Nested Schema for boot_to_network_iso.share_detail
Optional:
ip_address(String)password(String)share_name(String)user(String)work_group(String)
Nested Schema for device_attributes
Optional:
attributes(List of Object) (see below for nested schema)device_servicetags(Set of String)
Nested Schema for device_attributes.attributes
Optional:
attribute_id(Number)display_name(String)is_ignored(Boolean)value(String)
Import
Import is supported using the following syntax:
terraform import ome_deployment.deploy-template-3 "<existing_deployment_name>"