Skip to content

Commit 199fa4f

Browse files
author
Christopher Manouvrier
committed
feat: Allow RootVolumeThroughput to be set for gp3 root volumes
1 parent f0de180 commit 199fa4f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

templates/aws-stack.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@ Parameters:
374374
Type: String
375375
Default: "gp3"
376376

377+
RootVolumeThroughput:
378+
Description: If the `RootVolumeType` is gp3, the throughput to provision for the root volume
379+
Type: Number
380+
Default: 125
381+
377382
RootVolumeIops:
378383
Description: If the `RootVolumeType` is io1 or io2, the number of IOPS to provision for the root volume
379384
Type: Number
@@ -723,6 +728,9 @@ Conditions:
723728
UseStackNameForInstanceName:
724729
!Equals [ !Ref InstanceName, "" ]
725730

731+
IsRootVolumeIsGp3:
732+
!Equals [ !Ref RootVolumeType, "gp3" ]
733+
726734
IsRootVolumeIsIo1OrIo2:
727735
!Or
728736
- !Equals [ !Ref RootVolumeType, "io1" ]
@@ -1156,6 +1164,7 @@ Resources:
11561164
VolumeSize: !Ref RootVolumeSize
11571165
VolumeType: !Ref RootVolumeType
11581166
Encrypted: !Ref RootVolumeEncrypted
1167+
Throughput: !If [ IsRootVolumeIsGp3, !Ref RootVolumeThroughput, !Ref "AWS::NoValue" ]
11591168
Iops: !If [ IsRootVolumeIsIo1OrIo2, !Ref RootVolumeIops, !Ref "AWS::NoValue" ]
11601169
TagSpecifications:
11611170
- ResourceType: instance

0 commit comments

Comments
 (0)