Skip to content

Server

Servers are the central anchor of the compute data model. Each server entry defines the server profile of a physical UCS server, from a profile template, per-server policies, or both, and controls how Intersight manages the server’s lifecycle — from profile assignment through to hardware deployment.

Servers are identified by serial number for direct assignment to a physical server.

Location in Intersight GUI: Profiles » Server Profiles

Diagram
NameTypeConstraintMandatoryDefault Value
serversListserversNo

NameTypeConstraintMandatoryDefault Value
nameStringYes
tagsListtagsNo
provisioningClassprovisioningNo

NameTypeConstraintMandatoryDefault Value
keyStringYes
valueStringNo
typeChoiceKeyValue, PathTagNo

NameTypeConstraintMandatoryDefault Value
managed_byChoiceintersight, redfishYes
profile_templateStringNo
managedBooleantrue, falseNotrue
actionChoicenone, sync, deploy, sync_and_deploy, unassignNonone
power_stateChoiceon, shutdown, offNo
wait_for_completionBooleantrue, falseNofalse
intersightClassintersightNo

NameTypeConstraintMandatoryDefault Value
organizationStringYes
serial_numberStringNo
resource_poolStringNo
target_platformChoiceFIAttached, Standalone, UnifiedEdgeServerNo
uuid_poolStringNo
policiesClasspoliciesNo

policies (compute.servers.provisioning.intersight)

Section titled “policies (compute.servers.provisioning.intersight)”
NameTypeConstraintMandatoryDefault Value
bios_policyStringNo
boot_order_policyStringNo
certificate_management_policyStringNo
imc_access_policyStringNo
ipmi_over_lan_policyStringNo
lan_connectivity_policyStringNo
local_user_policyStringNo
network_connectivity_policyStringNo
ntp_policyStringNo
power_policyStringNo
san_connectivity_policyStringNo
serial_over_lan_policyStringNo
scrub_policyStringNo
drive_security_policyStringNo
adapter_configuration_policyStringNo
device_connector_policyStringNo
sd_card_policyStringNo
memory_policyStringNo
persistent_memory_policyStringNo
smtp_policyStringNo
snmp_policyStringNo
ssh_policyStringNo
storage_policyStringNo
syslog_policyStringNo
thermal_policyStringNo
firmware_policyStringNo
virtual_kvm_policyStringNo
virtual_media_policyStringNo
ldap_policyStringNo

A server profile takes its policies from a profile template, from the server itself, or from both. Which of these applies depends on whether profile_template is defined and whether the server defines any of intersight.policies, intersight.uuid_pool or intersight.target_platform:

Modeprofile_templatePer-server settingsServer profile in Intersight
TemplateDefinedNoneDerived from the template
Template with overridesDefinedSomeStandalone, with the template’s settings and the server’s overrides
No templateNot definedAll the profile requiresStandalone, with the server’s settings

Use a template for settings that servers share, and per-server settings for what differs from one server to the next. This avoids a dedicated template for every server that differs from the others.

Overrides. Each per-server setting replaces the template’s setting of the same name, and every setting the server does not set is taken from the template. For example, a server that sets policies.bios_policy gets its own BIOS policy and every other policy from its template. A policy the template sets cannot be removed from a single server; use a different template, or no template, for that server. The fields under policies have the same names as the policy fields of a server template.

target_platform is taken from the server, then from its template, and is Standalone for a server with neither. uuid_pool is taken from the server, then from its template.

Intersight cannot change the target platform of an existing profile: an apply that changes it fails with invalid_server_family_for_platform_type. To change a server’s platform, remove the server’s entry and apply, so the profile is deleted, then add it back. This also applies to a server without a template whose profile was created by an earlier module version, which created those profiles as Standalone. Deleting the profile unassigns the server, so do it in a maintenance window if the server is assigned.

Per-server policies and the UUID pool must exist in the server’s intersight.organization, just like its profile_template. They must also be supported on the server’s target platform, as for a server template (see Supported policies per target platform in the Server Template documentation).

Standalone profiles. Intersight does not allow a profile derived from a template to differ from the template, so a server with overrides, or without a template, gets a standalone profile:

  • In the Intersight GUI, the profile is not linked to its template.
  • The profile can be edited in the Intersight GUI. Terraform reverts those edits on the next apply.
  • For a server with overrides, the template’s settings are taken at the same points in time as for a derived profile: when the profile is created, when profile_template changes, and on every apply while action is sync or sync_and_deploy. Changes to the server’s own settings are applied to the profile on the next apply. In both cases, action decides when the profile is deployed to hardware, as described below.
  • Without a template, sync has no template to take settings from, and behaves like none. sync_and_deploy behaves like deploy on every apply.

Switching modes. Adding the first per-server setting to a server that uses a template turns its derived profile into a standalone profile, and removing the last one turns it back into a derived profile. Any switch between the three modes takes a single apply, also for a profile that is deployed:

  • The profile is updated in place; it is not deleted and recreated, and the server keeps its assignment.
  • A profile that becomes derived is attached to its template and synced with it, so it gets the template’s current settings.
  • With action: deploy, the switch deploys the profile once, as a change of profile_template does. With action: none, the changed profile is not deployed.

The action attribute controls what Terraform does beyond creating and assigning the server profile.

Every server profile is created from its template’s current policies, whatever the action value. This matches deriving a profile from a template in the Intersight GUI. Changing profile_template derives the profile again from the new template. A server with per-server settings gets them on top of the template’s, as described in Profile Policies above.

After that, action decides whether Terraform picks up later template changes and whether it deploys to hardware. This works the same for a server that uses a template with overrides. With none or deploy, later template changes are not pulled in, and terraform plan shows no diff for the profile. Do not rely on Intersight to flag the profile either: its template sync status can stay OK after the template’s policies change.

action has five values:

ValuePicks up later template changesDeploys to hardwareSafe to leave permanently
none (default)NoNoYes
syncYes, on every applyNoNo — set temporarily
deployNoOnce, when created, template changed, or action set to deployYes
sync_and_deployYes, on every applyYes, on every applyNo — maintenance window only
unassignNoDetaches the profile from the serverNo — set temporarily

none — Terraform creates the server profile from its template and assigns it to the server, then stops. No configuration is pushed to hardware. Use this to stage profiles for operator review before committing.

sync — Terraform syncs the profile with its template on every apply, so it picks up template changes. No hardware interaction occurs. Use it temporarily: set sync, apply, review the changes on the profile in Intersight, then set action back. While sync is set, every terraform plan shows the sync as a pending change.

deploy — Terraform deploys the current profile state to hardware. It does not pull in template changes made after the profile was created. If the template was updated after the profile was last synced, the existing profile configuration is deployed as-is. Safe to leave permanently, because Terraform only deploys when the profile is created, its template changes, or action is changed to deploy; not on later applies or when the template contents change.

sync_and_deploy — Terraform syncs the profile with the latest template and deploys it to hardware, on every apply. This is the only value that pushes template changes to the physical server in one step. While it is set, every terraform plan shows a pending sync and deploy. Use only during a declared maintenance window, because any BIOS, boot order or adapter policy change will trigger a server reboot.

unassign — Terraform sends an explicit Unassign command to Intersight, detaching the profile from the server. action has no one-shot marker for this value — it is sent on every apply where it is set (the same convention deploy follows for its own command), so set it, apply, then set action back to none (or remove the attribute); leaving unassign set has no further effect beyond the first apply, since Intersight’s unassign is idempotent, but it is still not a standing configuration to leave in place. See the warning below before using this: in most cases, removing the server’s entry from the data model entirely (so Terraform destroys the profile) is the better path, since destroy already waits for the same Unassign workflow.

Warning: Commenting out or removing serial_number from an otherwise-present server entry does not unassign the profile in Intersight. assigned_server is a provider-managed (optional + computed) attribute — when its underlying config block disappears, Terraform has no opinion on it and simply keeps the provider’s last-known value, so no detach is ever sent. The GUI continues to show the profile bound to its original hardware even though terraform apply succeeds cleanly. To actually detach the hardware, either set action: unassign (above) or remove the server’s entire entry so Terraform destroys the profile (destroy already waits for the Unassign workflow via this module’s wait_for_completion = true on the server profile resource).

Note: After an apply that syncs a profile with its template, the next terraform plan shows Warning: BulkMoMerger object <moid> not found. Removing from statefile. Intersight deletes the sync request once it has run, and Terraform drops it from state. Nothing on the profile or hardware is affected. With none or deploy, the plan still reports no changes and the warning appears once. With sync or sync_and_deploy, it appears after every apply, alongside the pending sync.

Reboot warning: deploy and sync_and_deploy may reboot the server if the profile includes BIOS, boot order, or adapter policy changes. For servers with a serial_number or resource_pool, every deploy schedules an Intersight Activate with proceed-on-reboot, so a change that needs a reboot is applied automatically during the deploy and the host reboots without manual confirmation. This is always on, not configurable, and identical for both assignment types. Domain and chassis profile deploys do not schedule an Activate. The profile’s ConfigChangeContext in the Intersight GUI indicates whether a reboot is required — verify this before running terraform apply with either of these values.

When action is deploy or sync_and_deploy, deployment is an asynchronous job in Intersight. For servers, terraform apply always blocks until the profile workflows have finished, which can take several minutes. The wait_for_completion attribute is accepted but has no effect on server deploys, and destroying a server waits for the Unassign workflow in the same way.

power_state sets the desired power state of the physical server. It is independent of action, and works whether or not a profile has been deployed.

ValueIntersight operationBehavior
onPowerOnPowers the server on
shutdownShutdownGraceful shutdown of the operating system. Needs a cooperating OS; if the OS hangs, the server never reaches off
offPowerOffImmediate power-off, equivalent to pulling the power. Use shutdown when the OS should stop cleanly

The state is reconciled on every apply: the operation is only sent when the server’s actual power state differs from the desired one.

While the server differs from the desired state, the operation is sent again on every apply, so a state changed outside Terraform, for example a server powered on in the Intersight GUI after it was shut down, is corrected on the next apply. Once the server is in the desired state, the next plan shows the completed power request being removed (terraform_data.server_power destroyed). This is expected and happens once: removing it does not send anything to Intersight, and the plan after that shows no changes.

When power_state is not defined, power_state does not manage the server’s power: it never sends a power operation, and it does not reset a state that was changed outside Terraform, for example in the Intersight GUI. This is the default. Removing the attribute from a server that had it behaves the same way: the server keeps its current power state; it is not powered back on or off.

Without power_state, the server’s power is only affected indirectly by profile operations, and this is controlled by Intersight, not by this module:

  • Assigning a profile to a server, deploying it, or changing its template can reboot the server or change its power state.
  • Unassigning a profile (action: unassign, or removing the server’s entry so the profile is destroyed) runs the Undeploy workflow, which powers the server off.

When power_state is defined, it is reconciled on the next apply after such an event, so it can be used to bring the server back to the intended state.

power_state requires managed_by: intersight and intersight.serial_number: the module identifies the server by its serial number. Servers assigned from a resource_pool are not supported yet, because the module does not know which server Intersight assigns from the pool. A server whose serial number Intersight has not inventoried yet is skipped until it appears in the inventory.

Additional requirement: the Intersight Terraform provider has no resource for changing a server’s power state, so the module sends the power operation with a helper script (scripts/set_server_power.py). This is only used for servers that define power_state; all other users are unaffected. The machine running terraform apply needs python3 with the requests and cryptography packages, and the INTERSIGHT_API_KEY, INTERSIGHT_SECRET_KEY and INTERSIGHT_ENDPOINT_URL environment variables, the same ones used by the provider.

Stage: action: none → profile created from template and assigned, no hardware change
Review: check ConfigChangeContext in Intersight GUI
Maintenance Window: action: sync_and_deploy → deploy during maintenance
Steady: action: deploy → safe standing configuration, deploys only when the profile is created, its template changes or action is set to deploy
Template change: action: sync → review in Intersight GUI → action: deploy (in a maintenance window)
Detach: action: unassign → detaches the profile from the server; or remove the server's entry entirely to also destroy the profile

Example-1: Two servers in steady-state with action: deploy — profiles are deployed on initial apply and will deploy again only if their template changes or action is set to deploy again.

compute:
servers:
- name: node-01
provisioning:
managed_by: intersight
profile_template: web-server-template
action: deploy
intersight:
organization: MyOrganization
serial_number: FCH2345V0AB
- name: node-02
provisioning:
managed_by: intersight
profile_template: web-server-template
action: deploy
intersight:
organization: MyOrganization
serial_number: FCH2345V0AC

Example-2: Server staged for review — profile is created and assigned but hardware is untouched until action is changed.

compute:
servers:
- name: node-03
provisioning:
managed_by: intersight
profile_template: web-server-template
action: none
intersight:
organization: MyOrganization
serial_number: FCH2345V0AD

Example-3: Maintenance window deployment — sync with the latest template and deploy, blocking until the server reports OK.

compute:
servers:
- name: node-01
provisioning:
managed_by: intersight
profile_template: web-server-template
action: sync_and_deploy
intersight:
organization: MyOrganization
serial_number: FCH2345V0AB

Example-4: Detaching a server from its profile — set action: unassign, apply, then set action back to none (or remove it). The profile and its data model entry remain; only the hardware assignment is removed.

compute:
servers:
- name: node-01
provisioning:
managed_by: intersight
profile_template: web-server-template
action: unassign
intersight:
organization: MyOrganization
serial_number: FCH2345V0AB

Example-5: Keep a server powered on, and cleanly shut down another one ahead of maintenance.

compute:
servers:
- name: node-01
provisioning:
managed_by: intersight
profile_template: web-server-template
action: deploy
power_state: on
intersight:
organization: MyOrganization
serial_number: FCH2345V0AB
- name: node-02
provisioning:
managed_by: intersight
profile_template: web-server-template
power_state: shutdown
intersight:
organization: MyOrganization
serial_number: FCH2345V0AC

Example-6: Power a server off immediately, without waiting for the operating system.

compute:
servers:
- name: node-03
provisioning:
managed_by: intersight
profile_template: web-server-template
power_state: off
intersight:
organization: MyOrganization
serial_number: FCH2345V0AD

Example-7: Two servers share a template, and one of them overrides the template’s BIOS and boot order policies. node-01 gets a profile derived from the template; node-02 gets a standalone profile with the template’s other policies.

compute:
servers:
- name: node-01
provisioning:
managed_by: intersight
profile_template: web-server-template
action: deploy
intersight:
organization: MyOrganization
serial_number: FCH2345V0AB
- name: node-02
provisioning:
managed_by: intersight
profile_template: web-server-template
action: deploy
intersight:
organization: MyOrganization
serial_number: FCH2345V0AC
policies:
bios_policy: hpc-bios
boot_order_policy: san-boot

Example-8: A server without a template, with its policies, UUID pool and target platform configured on the server.

compute:
servers:
- name: node-04
provisioning:
managed_by: intersight
action: deploy
intersight:
organization: MyOrganization
serial_number: FCH2345V0AE
target_platform: FIAttached
uuid_pool: web-uuid
policies:
bios_policy: web-bios
boot_order_policy: local-boot
imc_access_policy: imc-access
lan_connectivity_policy: web-lan
virtual_kvm_policy: kvm