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
Section titled “Diagram”Classes
Section titled “Classes”compute
Section titled “compute”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| servers | List | servers | No |
servers (compute)
Section titled “servers (compute)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| tags | List | tags | No | |
| provisioning | Class | provisioning | No |
tags (compute.servers)
Section titled “tags (compute.servers)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| key | String | Yes | ||
| value | String | No | ||
| type | Choice | KeyValue, PathTag | No |
provisioning (compute.servers)
Section titled “provisioning (compute.servers)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| managed_by | Choice | intersight, redfish | Yes | |
| profile_ | String | No | ||
| managed | Boolean | true, false | No | true |
| action | Choice | none, sync, deploy, sync_and_deploy, unassign | No | none |
| power_state | Choice | on, shutdown, off | No | |
| wait_ | Boolean | true, false | No | false |
| intersight | Class | intersight | No |
intersight (compute.servers.provisioning)
Section titled “intersight (compute.servers.provisioning)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| organization | String | Yes | ||
| serial_number | String | No | ||
| resource_pool | String | No | ||
| target_platform | Choice | FIAttached, Standalone, UnifiedEdgeServer | No | |
| uuid_pool | String | No | ||
| policies | Class | policies | No |
policies (compute.servers.provisioning.intersight)
Section titled “policies (compute.servers.provisioning.intersight)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| bios_policy | String | No | ||
| boot_ | String | No | ||
| certificate_ | String | No | ||
| imc_ | String | No | ||
| ipmi_ | String | No | ||
| lan_ | String | No | ||
| local_ | String | No | ||
| network_ | String | No | ||
| ntp_policy | String | No | ||
| power_policy | String | No | ||
| san_ | String | No | ||
| serial_ | String | No | ||
| scrub_policy | String | No | ||
| drive_ | String | No | ||
| adapter_ | String | No | ||
| device_ | String | No | ||
| sd_card_policy | String | No | ||
| memory_policy | String | No | ||
| persistent_ | String | No | ||
| smtp_policy | String | No | ||
| snmp_policy | String | No | ||
| ssh_policy | String | No | ||
| storage_policy | String | No | ||
| syslog_policy | String | No | ||
| thermal_policy | String | No | ||
| firmware_policy | String | No | ||
| virtual_ | String | No | ||
| virtual_ | String | No | ||
| ldap_policy | String | No |
Profile Policies
Section titled “Profile Policies”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:
| Mode | profile_template | Per-server settings | Server profile in Intersight |
|---|---|---|---|
| Template | Defined | None | Derived from the template |
| Template with overrides | Defined | Some | Standalone, with the template’s settings and the server’s overrides |
| No template | Not defined | All the profile requires | Standalone, 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_templatechanges, and on every apply whileactionissyncorsync_and_deploy. Changes to the server’s own settings are applied to the profile on the next apply. In both cases,actiondecides when the profile is deployed to hardware, as described below. - Without a template,
synchas no template to take settings from, and behaves likenone.sync_and_deploybehaves likedeployon 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 ofprofile_templatedoes. Withaction: none, the changed profile is not deployed.
Action Attribute
Section titled “Action Attribute”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:
| Value | Picks up later template changes | Deploys to hardware | Safe to leave permanently |
|---|---|---|---|
none (default) | No | No | Yes |
sync | Yes, on every apply | No | No — set temporarily |
deploy | No | Once, when created, template changed, or action set to deploy | Yes |
sync_and_deploy | Yes, on every apply | Yes, on every apply | No — maintenance window only |
unassign | No | Detaches the profile from the server | No — 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_numberfrom an otherwise-present server entry does not unassign the profile in Intersight.assigned_serveris 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 thoughterraform applysucceeds cleanly. To actually detach the hardware, either setaction: unassign(above) or remove the server’s entire entry so Terraform destroys the profile (destroy already waits for the Unassign workflow via this module’swait_for_completion = trueon the server profile resource).
Note: After an apply that syncs a profile with its template, the next
terraform planshowsWarning: 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. Withnoneordeploy, the plan still reports no changes and the warning appears once. Withsyncorsync_and_deploy, it appears after every apply, alongside the pending sync.
Reboot warning:
deployandsync_and_deploymay reboot the server if the profile includes BIOS, boot order, or adapter policy changes. For servers with aserial_numberorresource_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’sConfigChangeContextin the Intersight GUI indicates whether a reboot is required — verify this before runningterraform applywith either of these values.
wait_for_completion
Section titled “wait_for_completion”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
Section titled “power_state”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.
| Value | Intersight operation | Behavior |
|---|---|---|
on | PowerOn | Powers the server on |
shutdown | Shutdown | Graceful shutdown of the operating system. Needs a cooperating OS; if the OS hangs, the server never reaches off |
off | PowerOff | Immediate 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.
Recommended workflow
Section titled “Recommended workflow”Stage: action: none → profile created from template and assigned, no hardware changeReview: check ConfigChangeContext in Intersight GUIMaintenance Window: action: sync_and_deploy → deploy during maintenanceSteady: action: deploy → safe standing configuration, deploys only when the profile is created, its template changes or action is set to deployTemplate 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 profileExamples
Section titled “Examples”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: FCH2345V0ACExample-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: FCH2345V0ADExample-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: FCH2345V0ABExample-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: FCH2345V0ABExample-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: FCH2345V0ACExample-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: FCH2345V0ADExample-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-bootExample-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