Skip to content

Latest commit

 

History

History

machine-pool

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

machine-pool

Introduction

This Terraform sub-module manages the machine pool for ROSA Classic clusters. It enables you to efficiently configure and scale machine pools after cluster deployment, ensuring optimal resource allocation and performance for workloads within the ROSA Classic cluster environment. With this module, you can easily adjust the size and specifications of machine pools, facilitating seamless adaptation to changing workload demands and operational requirements in ROSA Classic clusters.

For more information, see Using machine pools on your cluster.

Prerequisites

Make sure you have an existing ROSA Classic cluster. (see rosa-cluster-classic sub-module)

Example Usage

module "mp" {
  source = "terraform-redhat/rosa-classic/rhcs//modules/machine-pool"

  cluster_id = "cluster-id-123"
  name         = "my-pool"
  machine_type = "m5.xlarge"
  replicas     = 2
}

Requirements

Name Version
terraform >= 1.0
rhcs >= 1.6.2

Providers

Name Version
rhcs >= 1.6.2

Modules

No modules.

Resources

Name Type
rhcs_machine_pool.machine_pool resource

Inputs

Name Description Type Default Required
autoscaling_enabled Enables autoscaling. If true, this variable requires you to set a maximum and minimum replicas range using the max_replicas and min_replicas variables. bool null no
availability_zone Select the availability zone in which to create a single AZ machine pool for a multi-AZ cluster. string null no
aws_additional_security_group_ids AWS additional security group IDs. list(string) null no
cluster_id Identifier of the cluster. string n/a yes
disk_size Root disk size, in GiB. number null no
labels Labels for the machine pool. Format should be a comma-separated list of 'key = value'. This list overwrites any modifications made to node labels on an ongoing basis. map(string) null no
machine_type Identifier of the machine type used by the nodes, for example m5.xlarge. Use the rhcs_machine_types data source to find the possible values. string n/a yes
max_replicas The maximum number of replicas for autoscaling functionality. number null no
max_spot_price Max spot price. number null no
min_replicas The minimum number of replicas for autoscaling functionality. number null no
multi_availability_zone Create a multi-AZ machine pool for a multi-AZ cluster (default is true). bool null no
name Name of the machine pool. Must consist of lower-case alphanumeric characters or '-', start and end with an alphanumeric character. string n/a yes
replicas The amount of the machine created in this machine pool. number null no
subnet_id Select the subnet in which to create a single AZ machine pool for a BYO-VPC cluster. string null no
taints Taints for a machine pool. This list overwrites any modifications made to node taints on an ongoing basis.
list(object({
key = string
value = string
schedule_type = string
}))
null no
use_spot_instances Use Amazon EC2 spot instances. bool null no

Outputs

Name Description
id Unique identifier of the machine pool.