From 71f9ec4b38cbbaedac64df0990a0cdc47680efc7 Mon Sep 17 00:00:00 2001 From: John Hixson Date: Wed, 29 Oct 2025 12:36:00 -0700 Subject: [PATCH] Ensure Throughput setting is honoured on gp3 volumes --- pkg/actuators/machine/instances.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/actuators/machine/instances.go b/pkg/actuators/machine/instances.go index a49229559..79ef7ef3b 100644 --- a/pkg/actuators/machine/instances.go +++ b/pkg/actuators/machine/instances.go @@ -316,6 +316,7 @@ func getBlockDeviceMappings(machine runtimeclient.ObjectKey, blockDeviceMappingS } // IOPS settings are only valid on IO1, IO2 and GP3 block devices + // Throughput settings are only valid on GP3 block devices // https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/create-volume.html switch aws.StringValue(volumeType) { case ec2.VolumeTypeIo1, ec2.VolumeTypeIo2, ec2.VolumeTypeGp3: @@ -325,6 +326,9 @@ func getBlockDeviceMappings(machine runtimeclient.ObjectKey, blockDeviceMappingS if blockDeviceMappingSpec.EBS.Iops != nil && *blockDeviceMappingSpec.EBS.Iops > 0 { blockDeviceMapping.Ebs.Iops = blockDeviceMappingSpec.EBS.Iops } + if aws.StringValue(volumeType) == ec2.VolumeTypeGp3 && blockDeviceMappingSpec.EBS.ThroughputMib != nil && *blockDeviceMappingSpec.EBS.ThroughputMib > 0 { + blockDeviceMapping.Ebs.Throughput = blockDeviceMappingSpec.EBS.ThroughputMib + } } if aws.StringValue(blockDeviceMappingSpec.EBS.KMSKey.ID) != "" {