This module creates a slurm controller node via the internal slurm_instance_template module.
More information about Slurm On GCP can be found at the [project's GitHub page][slurm-gcp] and in the Slurm on Google Cloud User Guide.
The user guide provides detailed instructions on customizing and enhancing the Slurm on GCP cluster as well as recommendations on configuring the controller for optimal performance at different scales.
- id: slurm_controller
source: community/modules/scheduler/schedmd-slurm-gcp-v6-controller
use:
- network
- homefs
- compute_partition
settings:
machine_type: c2-standard-8This creates a controller node with the following attributes:
- connected to the primary subnetwork of
network - the filesystem with the ID
homefs(defined elsewhere in the blueprint) mounted - One partition with the ID
compute_partition(defined elsewhere in the blueprint) - machine type upgraded from the default
c2-standard-4toc2-standard-8
The schedmd-slurm-gcp-v6-controller module supports the reconfiguration of
partitions and slurm configuration in a running, active cluster.
To reconfigure a running cluster:
- Edit the blueprint with the desired configuration changes
- Call
gcluster create <blueprint> -wto overwrite the deployment directory - Follow instructions in terminal to deploy
The following are examples of updates that can be made to a running cluster:
- Add or remove a partition to the cluster
- Resize an existing partition
- Attach new network storage to an existing partition
NOTE: Changing the VM
machine_typeof a partition may not work. It is better to create a new partition and delete the old one.
The schedmd-slurm-gcp-v6-controller module supports High Availability (HA) for
the Slurm controller. This feature deploys a secondary "Backup" controller that
allows the cluster to continue operating if the primary controller fails. The module
manages these controllers using a Google Compute Managed Instance Group (MIG).
By default, the MIG is zonal but can be configured as regional to increase
fault tolerance across multiple zones.
-
Primary Controller: The active Slurm controller.
-
Backup Controller: A passive standby controller that monitors the primary.
-
Shared State: Both controllers share the Slurm state directory (e.g.,
/var/spool/slurm) via a network mount (Filestore or NFS) to synchronize keys and runtime state.
To enable High Availability:
- Set
enable_backup_controllertotrue. - Set
controller_state_disktonullto disable the default local state disk. - Ensure
StateSaveLocationpoints to a shared network mount (e.g., Filestore, NFS) that is mounted on both controllers at/var/spool/slurm. - Configure the Managed Instance Group distribution type using
controller_ha_type(set to either"zonal"or"regional", defaults to"zonal"). - Provide at least two static IP addresses in
static_ips(one for the primary controller and one for the backup controller). - Configure an external database (
cloudsql) to manage Slurm accounting and state across the controllers.
CRITICAL: The
StateSaveLocationMUST be a shared network filesystem (like Filestore or NFS) that supports simultaneous read/write access from both controllers. Zonal or Regional Persistent Disks (PD) are NOT supported for this purpose as they do not provide the necessary shared access for HA state management.
- id: slurm_controller
source: community/modules/scheduler/schedmd-slurm-gcp-v6-controller
use:
- network
- homefs
settings:
enable_backup_controller: true
controller_ha_type: regional
controller_state_disk: null
static_ips:
- 10.80.0.10
- 10.80.0.11
cloudsql:
server_ip: $(slurm_db.cloudsql.server_ip)
user: $(slurm_db.cloudsql.user)
password: $(slurm_db.cloudsql.password)
db_name: $(slurm_db.cloudsql.db_name)
network_storage:
- server_ip: $(controller_fs.network_storage.server_ip)
remote_mount: $(controller_fs.network_storage.remote_mount)
local_mount: /var/spool/slurm
fs_type: nfs
mount_options: _netdev,hard,intrWhen enable_backup_controller is true, instances are managed by a Managed Instance Group (MIG) with an autohealing policy using a Google Compute Health Check. By default, a TCP health check probes port 6818 with initial_delay_sec = 900 to allow time for controller startup.
You can customize this configuration using the health_check settings block.
-
Slow Startup (large state/long startup scripts): Increase
initial_delay_sec(e.g.1200+) to prevent premature restarts. -
Fast Failover: Lower
initial_delay_sec(e.g.600),check_interval_sec, andtimeout_sec. Note:timeout_secmust be$\le$ check_interval_sec. -
Shared VPC: The health check firewall rule must be created in the host project. If permissions are restricted or rules are pre-configured, set
create_firewall_ruletofalseto disable automatic creation. If configuring firewall rules manually, you must allow ingress traffic from GCP health check prober IP ranges (35.191.0.0/16and130.211.0.0/22) to the controllers on the health check port. -
HTTP Health Checks: Set
typeto"http"and configurerequest_path(e.g."/healthz") to check slurmctld endpoints. See slurmctld HTTP server for more details.
Example configuration overrides:
health_check:
type: "tcp"
initial_delay_sec: 1200
check_interval_sec: 20
timeout_sec: 10
create_firewall_rule: trueTo provide stable network failover and avoid hardcoding individual controller IPs, an Internal Load Balancer (ILB) can be provisioned in front of the primary and backup controllers.
To enable the Internal Load Balancer:
- Ensure
enable_backup_controlleris set totrue. - Set
enable_controller_load_balancertotrue. - (Optional) Provide a static IP address using
controller_load_balancer_ipto assign to the ILB's forwarding rule (VIP). If omitted, a dynamic IP is allocated from the subnetwork.
An Active-Passive HTTP health check agent automatically runs on port 6821 on each controller instance. The health check agent executes scontrol ping locally and reports status to the ILB:
- Primary Controller (
-0): Returns HTTP200 OKif the primary controller is up and active, and503 Service Unavailableif offline. - Backup Controller (
-1): Returns HTTP200 OKonly when the primary controller is down/offline and the backup controller is up and active. If the primary controller is up, the backup returns503 Service Unavailable(Standby) to prevent traffic routing to the standby instance.
This setup ensures that all Slurm traffic is directed exclusively to the active controller node, enabling seamless and stable failover.
- Bypassing Loopback Routing Loops: When
enable_controller_load_balanceris active, the primary and backup controllers are configured with their real internal IPs mapped in/etc/hosts. This ensures that they can communicate directly with each other and bypasses potential loopback routing loops through the load balancer VIP. Non-controller nodes (such as login and compute nodes) map the controller hostname directly to the Load Balancer VIP. - Multi-Threaded Probing: The health check service uses a multi-threaded HTTPServer (
ThreadingHTTPServer) to support simultaneous, concurrent probes from multiple Google Cloud load-balancer IP ranges without blocking or timing out. - Optimized Local Timeout: The health check agent executes
scontrol pingwith a reduced timeout of3seconds (down from5seconds). This ensures that if the local Slurm daemon hangs, the health check agent times out before the load balancer's typical 5-second probe timeout, returning a clean503 Service Unavailableresponse and preventing abrupt TCP teardowns. - Security & Least Privilege: The
slurm_health_check.servicesystemd unit runs under the dedicatedslurmuser and group rather thanroot, adhering to security best practices.
The HA feature is opt-in. If enable_backup_controller is set to false
(the default), the module deploys a standard single-controller cluster,
preserving existing behavior.
For more information on creating valid custom images for the controller VM instance or for custom instance templates, see our vm-images.md documentation page.
More information on GPU support in Slurm on GCP and other Cluster Toolkit modules can be found at docs/gpu-support.md
A maintenance event is when a compute engine stops a VM to perform a hardware or software update which is determined by the host maintenance policy. This can also affect the running jobs if the maintenance kicks in. Now, Customers can protect jobs from getting terminated due to maintenance using the cluster toolkit. You can enable creation of reservation for scheduled maintenance for your compute nodeset and Slurm will reserve your node for maintenance during the maintenance window. If you try to schedule any jobs which overlap with the maintenance reservation, Slurm would not schedule any job.
You can specify in your blueprint like
- id: compute_nodeset
source: community/modules/compute/schedmd-slurm-gcp-v6-nodeset
use: [network]
settings:
enable_maintenance_reservation: trueTo enable creation of reservation for maintenance.
While running job on slurm cluster, you can specify total run time of the job using -t flag.This would only run the job outside of the maintenance window.
srun -n1 -pcompute -t 10:00 <job.sh>Currently upcoming maintenance notification is supported in ALPHA version of compute API. You can update the API version from your blueprint,
- id: slurm_controller
source: community/modules/scheduler/schedmd-slurm-gcp-v6-controller
settings:
endpoint_versions:
compute: "alpha"Customers can also enable running GCP maintenance as Slurm job opportunistically to perform early maintenance. If a node is detected for maintenance, Slurm will create a job to perform maintenance and put it in the job queue.
If backfill scheduler is used, Slurm will backfill maintenance job if it can find any empty time window.
Customer can also choose builtin scheduler type. In this case, Slurm would run maintenance job in strictly priority order. If the maintenance job doesn't kick in, then forced maintenance will take place at scheduled window.
Customer can enable this feature at nodeset level by,
- id: debug_nodeset
source: community/modules/compute/schedmd-slurm-gcp-v6-nodeset
use: [network]
settings:
enable_opportunistic_maintenance: trueWhen using
enable_placement
with Slurm, Google Compute Engine will attempt to place VMs as physically close
together as possible. Capacity constraints at the time of VM creation may still
force VMs to be spread across multiple racks. Google provides the max-distance
flag which can used to control the maximum spreading allowed. Read more about
max-distance in the
official docs.
You can use the placement_max_distance setting on the nodeset module to
control the max-distance behavior. See the following example:
- id: nodeset
source: community/modules/compute/schedmd-slurm-gcp-v6-nodeset
use: [ network ]
settings:
machine_type: c2-standard-4
node_count_dynamic_max: 30
enable_placement: true
placement_max_distance: 1
> [!NOTE]
> `schedmd-slurm-gcp-v6-nodeset.settings.enable_placement: true` must also be
> set for placement_max_distance to take effect.
In the above case using a value of 1 will restrict VM to be placed on the same
rack. You can confirm that the `max-distance` was applied by calling the
following command while jobs are running:
```shell
gcloud beta compute resource-policies list \
--format='yaml(name,groupPlacementPolicy.maxDistance)'[!WARNING] If a zone lacks capacity, using a lower
max-distancevalue (such as 1) is more likely to cause VMs creation to fail.
Slurm uses a fan out mechanism to communicate large groups of nodes. The shape of this fan out tree is determined by the TreeWidth configuration variable.
In the cloud, this fan out mechanism can become unstable when nodes restart with new IP addresses. You can enforce that all nodes communicate directly with the controller by setting TreeWidth to a value >= largest partition.
If the largest partition was 200 nodes, configure the blueprint as follows:
- id: slurm_controller
source: community/modules/scheduler/schedmd-slurm-gcp-v6-controller
...
settings:
cloud_parameters:
tree_width: 200The default has been set to 128. Values above this have not been fully tested and may cause congestion on the controller. A more scalable solution is under way.
The ResumeRate parameter in slurm.conf controls the maximum number of nodes
that Slurm attempts to resume (power up) per minute. This is particularly
important in cloud environments where auto-scaling can lead to a large number of
nodes starting concurrently.
When many nodes start simultaneously, they can place a heavy load on shared
resources, especially shared filesystems, as they all try to mount filesystems
and access configuration files at the same time. By limiting the ResumeRate,
you can stagger the node startup process, reducing the peak load on these shared
resources and improving overall cluster stability during scaling events.
For example, to limit the node resumption rate to 100 nodes per minute, configure the blueprint as follows:
- id: slurm_controller
source: community/modules/scheduler/schedmd-slurm-gcp-v6-controller
...
settings:
cloud_parameters:
resume_rate: 100Adjust this value based on the capabilities of your shared filesystem and the expected scaling behavior of your cluster.
The Cluster Toolkit team maintains the wrapper around the slurm-on-gcp terraform modules. For support with the underlying modules, see the instructions in the slurm-gcp README.
Copyright 2026 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| Name | Version |
|---|---|
| terraform | >= 1.12.2 |
| >= 6.41 | |
| google-beta | >= 6.0.0 |
| local | ~> 2.0 |
| Name | Version |
|---|---|
| >= 6.41 | |
| google-beta | >= 6.0.0 |
| local | ~> 2.0 |
| Name | Source | Version |
|---|---|---|
| bucket | terraform-google-modules/cloud-storage/google | >= 6.1 |
| daos_network_storage_scripts | ../../../../modules/scripts/startup-script | n/a |
| gpu | ../../../../modules/internal/gpu-definition | n/a |
| login | ../../internal/slurm-gcp/login | n/a |
| nodeset_cleanup | ./modules/cleanup_compute | n/a |
| nodeset_cleanup_tpu | ./modules/cleanup_tpu | n/a |
| slurm_controller_template | ../../internal/slurm-gcp/instance_template | n/a |
| slurm_files | ./modules/slurm_files | n/a |
| slurm_nodeset_template | ../../internal/slurm-gcp/instance_template | n/a |
| slurm_nodeset_tpu | ../../internal/slurm-gcp/nodeset_tpu | n/a |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| additional_disks | List of maps of disks. | list(object({ |
[] |
no |
| additional_networks | Additional network interface details for the controller, if any. For Private Service Connect interfaces, 'network_attachment' must be the full resource URI: projects/{project}/regions/{region}/networkAttachments/{name}. | list(object({ |
[] |
no |
| advanced_machine_features | See https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance_template#nested_advanced_machine_features | object({ |
{ |
no |
| allow_automatic_updates | If false, disables automatic system package updates on the created instances. This feature is only available on supported images (or images derived from them). For more details, see https://cloud.google.com/compute/docs/instances/create-hpc-vm#disable_automatic_updates |
bool |
true |
no |
| backup_zone | Zone for the backup controller. If null, it will be placed in the same region, potentially different zone. | string |
null |
no |
| bandwidth_tier | Configures the network interface card and the maximum egress bandwidth for VMs. - Setting platform_default respects the Google Cloud Platform API default values for networking.- Setting virtio_enabled explicitly selects the VirtioNet network adapter.- Setting gvnic_enabled selects the gVNIC network adapter (without Tier 1 high bandwidth).- Setting tier_1_enabled selects both the gVNIC adapter and Tier 1 high bandwidth networking.- Note: both gVNIC and Tier 1 networking require a VM image with gVNIC support as well as specific VM families and shapes. - See official docs for more details. |
string |
"platform_default" |
no |
| bucket_dir | Bucket directory for cluster files to be put into. If not specified, then one will be chosen based on slurm_cluster_name. | string |
null |
no |
| bucket_name | Name of GCS bucket. Ignored when 'create_bucket' is true. |
string |
null |
no |
| can_ip_forward | Enable IP forwarding, for NAT instances for example. | bool |
false |
no |
| cgroup_conf_tpl | Slurm cgroup.conf template file path. | string |
null |
no |
| cloud_parameters | cloud.conf options. Defaults inherited from Slurm GCP repo | object({ |
{} |
no |
| cloudsql | Use this database instead of the one on the controller. server_ip : Address of the database server. user : The user to access the database as. password : The password, given the user, to access the given database. (sensitive) db_name : The database to access. user_managed_replication : The list of location and (optional) kms_key_name for secret |
object({ |
null |
no |
| compute_startup_script | DEPRECATED: compute_startup_script has been deprecated.Use startup_script of nodeset module instead. |
any |
null |
no |
| compute_startup_scripts_timeout | The timeout (seconds) applied to each startup script in compute nodes. If any script exceeds this timeout, then the instance setup process is considered failed and handled accordingly. NOTE: When set to 0, the timeout is considered infinite and thus disabled. |
number |
300 |
no |
| controller_ha_type | Type of Managed Instance Group for controllers: 'zonal' or 'regional'. | string |
"zonal" |
no |
| controller_load_balancer_ip | Optional static IP address to assign to the controller Internal Load Balancer (VIP). If null, one will be dynamically assigned from the subnetwork. | string |
null |
no |
| controller_network_attachment | SelfLink for NetworkAttachment to be attached to the controller, if any. | string |
null |
no |
| controller_project_id | Optionally. Provision controller and config bucket in the different project | string |
null |
no |
| controller_startup_script | Startup script used by the controller VM. | string |
"# no-op" |
no |
| controller_startup_scripts_timeout | The timeout (seconds) applied to each script in controller_startup_scripts. If any script exceeds this timeout, then the instance setup process is considered failed and handled accordingly. NOTE: When set to 0, the timeout is considered infinite and thus disabled. |
number |
300 |
no |
| controller_state_disk | A disk that will be attached to the controller instance template to save state of slurm. The disk is created and used by default. To disable this feature, set this variable to null. NOTE: This will not save the contents at /opt/apps and /home. To preserve those, they must be saved externally. |
object({ |
{ |
no |
| create_bucket | Create GCS bucket instead of using an existing one. | bool |
true |
no |
| deployment_name | Name of the deployment. | string |
n/a | yes |
| disable_controller_public_ips | DEPRECATED: Use enable_controller_public_ips instead. |
bool |
null |
no |
| disable_default_mounts | DEPRECATED: Use enable_default_mounts instead. |
bool |
null |
no |
| disable_smt | DEPRECATED: Use advanced_machine_features.threads_per_core instead. |
bool |
null |
no |
| disk_auto_delete | Whether or not the boot disk should be auto-deleted. | bool |
true |
no |
| disk_encryption_key | The id of the encryption key that is stored in Google Cloud KMS to use to encrypt all the disks on this instance | string |
null |
no |
| disk_encryption_key_service_account | The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. | string |
null |
no |
| disk_labels | Labels specific to the boot disk. These will be merged with var.labels. | map(string) |
{} |
no |
| disk_resource_manager_tags | (Optional) A set of key/value resource manager tag pairs to bind to the instance disks. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. | map(string) |
{} |
no |
| disk_size_gb | Boot disk size in GB. | number |
50 |
no |
| disk_storage_pool | Storage pool to use for the boot disk. Note that storage pools are only supported with Hyperdisk types. For boot disks, only hyperdisk-balanced is supported. You must provide an existing storage pool, as this module does not create new ones. | string |
null |
no |
| disk_type | Boot disk type, can be either hyperdisk-balanced, pd-ssd, pd-standard, pd-balanced, or pd-extreme. | string |
"pd-ssd" |
no |
| enable_backup_controller | Enables a secondary backup controller for High Availability. | bool |
false |
no |
| enable_bigquery_load | Enables loading of cluster job usage into big query. NOTE: Requires Google Bigquery API. |
bool |
false |
no |
| enable_chs_gpu_health_check_epilog | Enable a Cluster Health Sacnner(CHS) GPU health check that slurmd executes as an epilog script after completing a job step from a new job allocation. Compute nodes that fail GPU health check during epilog will be marked as drained. Find more details at: https://github.com/GoogleCloudPlatform/cluster-toolkit/tree/main/docs/CHS-Slurm.md |
bool |
false |
no |
| enable_chs_gpu_health_check_prolog | Enable a Cluster Health Sacnner(CHS) GPU health check that slurmd executes as a prolog script whenever it is asked to run a job step from a new job allocation. Compute nodes that fail GPU health check during prolog will be marked as drained. Find more details at: https://github.com/GoogleCloudPlatform/cluster-toolkit/tree/main/docs/CHS-Slurm.md |
bool |
false |
no |
| enable_cleanup_compute | Enables automatic cleanup of compute nodes and resource policies (e.g. placement groups) managed by this module, when cluster is destroyed. WARNING: Toggling this off will impact the running workload. Deployed compute nodes will be destroyed. |
bool |
true |
no |
| enable_confidential_vm | Enable the Confidential VM configuration. Note: the instance image must support option. | bool |
false |
no |
| enable_controller_load_balancer | Enables an Internal Load Balancer (ILB) in front of the controllers for stable Virtual IP and network-level failover. | bool |
false |
no |
| enable_controller_public_ips | If set to true. The controller will have a random public IP assigned to it. Ignored if access_config is set. | bool |
false |
no |
| enable_debug_logging | Enables debug logging mode. | bool |
false |
no |
| enable_default_mounts | Enable default global network storage from the controller - /home - /opt/apps |
bool |
null |
no |
| enable_devel | DEPRECATED: enable_devel is always on. |
bool |
null |
no |
| enable_expedited_requeue | Enables Expedited Requeue, which automatically requeues eligible jobs and grants them the highest priority upon node failure. (Usage: sbatch --requeue=expedite) | bool |
true |
no |
| enable_external_prolog_epilog | Automatically enable a script that will execute prolog and epilog scripts shared by NFS from the controller to compute nodes. Find more details at: https://github.com/GoogleCloudPlatform/slurm-gcp/blob/master/tools/prologs-epilogs/README.md |
bool |
null |
no |
| enable_health_check_start_only | Adjusts the Slurm HealthCheckNodeState behavior to run health checks solely upon node initialization. This prevents continuous health check polling. | bool |
false |
no |
| enable_hybrid | Enables use of hybrid controller mode. When true, controller_hybrid_config will be used instead of controller_instance_config and will disable login instances. |
bool |
false |
no |
| enable_openmetrics | Enable native Prometheus OpenMetrics telemetry via Slurm and Google Cloud Ops Agent | bool |
false |
no |
| enable_oslogin | Enables Google Cloud os-login for user login and authentication for VMs. See https://cloud.google.com/compute/docs/oslogin |
bool |
true |
no |
| enable_shielded_vm | Enable the Shielded VM configuration. Note: the instance image must support option. | bool |
false |
no |
| enable_slurm_auth | Enables slurm authentication instead of munge. | bool |
true |
no |
| enable_slurm_gcp_plugins | DEPRECATED: Slurm GCP plugins have been deprecated. Instead of 'max_hops' plugin please use the 'placement_max_distance' nodeset property. Instead of 'enable_vpmu' plugin please use 'advanced_machine_features.performance_monitoring_unit' nodeset property. |
any |
null |
no |
| enable_smt | DEPRECATED: Use advanced_machine_features.threads_per_core instead. |
bool |
null |
no |
| endpoint_versions | Version of the API to use (The compute service is the only API currently supported) | object({ |
{ |
no |
| epilog_scripts | List of scripts to be used for Epilog. Programs for the slurmd to execute on every node when a user's job completes. See https://slurm.schedmd.com/slurm.conf.html#OPT_Epilog. |
list(object({ |
[] |
no |
| experimental | Experimental Slurm settings. These features are subject to change and may be modified in future releases. | object({ |
{} |
no |
| extra_logging_flags | The only available flag is trace_api |
map(bool) |
{} |
no |
| gcloud_path_override | Directory of the gcloud executable to be used during cleanup | string |
"" |
no |
| guest_accelerator | List of the type and count of accelerator cards attached to the instance. | list(object({ |
[] |
no |
| health_check | Health check and autohealing configuration for controller HA instance groups. | object({ |
{} |
no |
| hybrid_conf | The hybrid configuration | object({ |
null |
no |
| install_dir | Directory where the hybrid configuration directory will be installed on the on-premise controller (e.g. /etc/slurm/hybrid). This updates the prefix path for the resume and suspend scripts in the generated cloud.conf file.This variable should be used when the TerraformHost and the SlurmctldHost are different. This will default to var.output_dir if null. |
string |
null |
no |
| instance_image | Defines the image that will be used in the Slurm controller VM instance. Expected Fields: name: The name of the image. Mutually exclusive with family. family: The image family to use. Mutually exclusive with name. project: The project where the image is hosted. For more information on creating custom images that comply with Slurm on GCP see the "Slurm on GCP Custom Images" section in docs/vm-images.md. |
map(string) |
{ |
no |
| instance_image_custom | A flag that designates that the user is aware that they are requesting to use a custom and potentially incompatible image for this Slurm on GCP module. If the field is set to false, only the compatible families and project names will be accepted. The deployment will fail with any other image family or name. If set to true, no checks will be done. See: https://goo.gle/hpc-slurm-images |
bool |
false |
no |
| instance_template | DEPRECATED: Instance template can not be specified for controller. | string |
null |
no |
| labels | Labels, provided as a map. | map(string) |
{} |
no |
| login_network_storage | An array of network attached storage mounts to be configured on all login nodes. | list(object({ |
[] |
no |
| login_nodes | List of slurm login instance definitions. | list(object({ |
[] |
no |
| login_startup_script | Startup script used by the login VMs. | string |
"# no-op" |
no |
| login_startup_scripts_timeout | The timeout (seconds) applied to each script in login_startup_scripts. If any script exceeds this timeout, then the instance setup process is considered failed and handled accordingly. NOTE: When set to 0, the timeout is considered infinite and thus disabled. |
number |
300 |
no |
| machine_type | Machine type to create. | string |
"c2-standard-4" |
no |
| metadata | Metadata, provided as a map. | map(string) |
{} |
no |
| min_cpu_platform | Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list: https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform |
string |
null |
no |
| munge_mount | Remote munge mount for compute and login nodes to acquire the munge.key. By default, the munge mount server will be assumed to be the var.slurm_control_host (or var.slurm_control_addr if non-null) whenserver_ip=null. |
object({ |
{ |
no |
| named_ports | Named ports for the controller instance group. | list(object({ |
[] |
no |
| network_storage | An array of network attached storage mounts to be configured on all instances. | list(object({ |
[] |
no |
| nodeset | Define nodesets, as a list. | list(object({ |
[] |
no |
| nodeset_dyn | Defines dynamic nodesets, as a list. | list(object({ |
[] |
no |
| nodeset_tpu | Define TPU nodesets, as a list. | list(object({ |
[] |
no |
| on_host_maintenance | Instance availability Policy. | string |
"MIGRATE" |
no |
| output_dir | Directory where this module will write its files to. These files include: cloud.conf; cloud_gres.conf; config.yaml; resume.py; suspend.py; and util.py. |
string |
null |
no |
| partitions | Cluster partitions as a list. See module slurm_partition. | list(object({ |
[] |
no |
| preemptible | Allow the instance to be preempted. | bool |
false |
no |
| project_id | Project ID to create resources in. | string |
n/a | yes |
| prolog_scripts | List of scripts to be used for Prolog. Programs for the slurmd to execute whenever it is asked to run a job step from a new job allocation. See https://slurm.schedmd.com/slurm.conf.html#OPT_Prolog. |
list(object({ |
[] |
no |
| region | The default region to place resources in. | string |
n/a | yes |
| resource_manager_tags | (Optional) A set of key/value resource manager tag pairs to bind to the instances. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. | map(string) |
{} |
no |
| service_account | DEPRECATED: Use service_account_email and service_account_scopes instead. |
object({ |
null |
no |
| service_account_email | Service account e-mail address to attach to the controller instance. | string |
null |
no |
| service_account_scopes | Scopes to attach to the controller instance. | set(string) |
[ |
no |
| shielded_instance_config | Shielded VM configuration for the instance. Note: not used unless enable_shielded_vm is 'true'. enable_integrity_monitoring : Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. enable_secure_boot : Verify the digital signature of all boot components, and halt the boot process if signature verification fails. enable_vtpm : Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. |
object({ |
{ |
no |
| slurm_bucket_kms_key | Customer-managed encryption key self-link to use for the Slurm configuration bucket. | string |
null |
no |
| slurm_cluster_name | Cluster name, used for resource naming and slurm accounting. If not provided it will default to the first 8 characters of the deployment name (removing any invalid characters). |
string |
null |
no |
| slurm_conf_template | Slurm slurm.conf template. Content of the file in 'slurm_conf_tpl' is used if this is not set. | string |
null |
no |
| slurm_conf_tpl | Slurm slurm.conf template file path. This path is used only if raw content is not provided in 'slurm_conf_template'. | string |
null |
no |
| slurm_control_host_port | The port number that the Slurm controller, slurmctld, listens to for work. | string |
"6818" |
no |
| slurm_key_mount | Remote mount for compute and login nodes to acquire the slurm.key. | object({ |
null |
no |
| slurmdbd_conf_tpl | Slurm slurmdbd.conf template file path. | string |
null |
no |
| static_ips | List of static IPs for VM instances. | list(string) |
[] |
no |
| subnetwork_self_link | Subnet to deploy to. | string |
n/a | yes |
| subnetwork_stack_type | Stack type of the subnet to deploy to. | string |
"IPV4_ONLY" |
no |
| tags | Network tag list. | list(string) |
[] |
no |
| task_epilog_scripts | List of scripts to be used for TaskEpilog. Programs for the slurmd to execute as the slurm job's owner after termination of each task. See https://slurm.schedmd.com/slurm.conf.html#OPT_TaskEpilog. |
list(object({ |
[] |
no |
| task_prolog_scripts | List of scripts to be used for TaskProlog. Programs for the slurmd to execute as the slurm job's owner prior to initiation of each task. See https://slurm.schedmd.com/slurm.conf.html#OPT_TaskProlog. |
list(object({ |
[] |
no |
| universe_domain | Domain address for alternate API universe | string |
"googleapis.com" |
no |
| zone | Zone where the instances should be created. If not specified, instances will be spread across available zones in the region. |
string |
null |
no |
| Name | Description |
|---|---|
| controller_instance_group | Self-link of the controller instance group (zonal or regional) if HA is enabled. |
| controller_instance_names | Names of the controller instances when HA is enabled. |
| controller_mig_id | Fully qualified group manager id (zonal or regional). |
| controller_mig_name | Name of the controller Managed Instance Group. |
| instructions | Post deployment instructions. |
| munge_deprecation_warning | Deprecation warning for legacy MUNGE authentication. |
| slurm_bucket | GCS Bucket of Slurm cluster file storage. |
| slurm_bucket_dir | Path directory within bucket_name for Slurm cluster file storage. |
| slurm_bucket_name | GCS Bucket name of Slurm cluster file storage. |
| slurm_bucket_path | Bucket path used by cluster. |
| slurm_cluster_name | Slurm cluster name. |
| slurm_control_host_port | The port number that the Slurm controller, slurmctld, listens to for work. |
| slurm_controller_instance | Compute instance of controller node |
| slurm_login_instances | Compute instances of login nodes |