diff --git a/apis/ec2/manualv1alpha1/common.go b/apis/ec2/manualv1alpha1/common.go index 337aa5ead1..3019ea0275 100644 --- a/apis/ec2/manualv1alpha1/common.go +++ b/apis/ec2/manualv1alpha1/common.go @@ -172,6 +172,14 @@ type EBSBlockDevice struct { // it is not used in requests to create gp2, st1, sc1, or standard volumes. IOps *int32 `json:"iops,omitempty"` + // The throughput that the volume supports, in MiB/s. + // + // Constraints: Up to 1,000MiB/s for gp3 volumes. + // + // Condition: This parameter is optional and only used to create gp3 volumes; + // it is not used in requests to create gp2, st1, sc1, io1, or standard volumes. + ThroughputMBps *int32 `json:"throughput,omitempty"` + // Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed // CMK under which the EBS volume is encrypted. // diff --git a/apis/ec2/manualv1alpha1/zz_generated.deepcopy.go b/apis/ec2/manualv1alpha1/zz_generated.deepcopy.go index 982ba5a95a..071901cd75 100644 --- a/apis/ec2/manualv1alpha1/zz_generated.deepcopy.go +++ b/apis/ec2/manualv1alpha1/zz_generated.deepcopy.go @@ -184,6 +184,11 @@ func (in *EBSBlockDevice) DeepCopyInto(out *EBSBlockDevice) { *out = new(int32) **out = **in } + if in.ThroughputMBps != nil { + in, out := &in.ThroughputMBps, &out.ThroughputMBps + *out = new(int32) + **out = **in + } if in.KmsKeyID != nil { in, out := &in.KmsKeyID, &out.KmsKeyID *out = new(string) diff --git a/package/crds/ec2.aws.crossplane.io_instances.yaml b/package/crds/ec2.aws.crossplane.io_instances.yaml index a0221dca9e..402286ea27 100644 --- a/package/crds/ec2.aws.crossplane.io_instances.yaml +++ b/package/crds/ec2.aws.crossplane.io_instances.yaml @@ -239,6 +239,15 @@ spec: snapshotId: description: The ID of the snapshot. type: string + throughput: + description: "The throughput that the volume supports, + in MiB/s. \n Constraints: Up to 1,000MiB/s for gp3 + volumes. \n Condition: This parameter is optional + and only used to create gp3 volumes; it is not used + in requests to create gp2, st1, sc1, io1, or standard + volumes." + format: int32 + type: integer volumeSize: description: "The size of the volume, in GiB. \n Default: If you're creating the volume from a snapshot and diff --git a/pkg/clients/ec2/instance.go b/pkg/clients/ec2/instance.go index 6bd48c9c64..975c2240d6 100644 --- a/pkg/clients/ec2/instance.go +++ b/pkg/clients/ec2/instance.go @@ -225,6 +225,7 @@ func GenerateEC2BlockDeviceMappings(mappings []manualv1alpha1.BlockDeviceMapping DeleteOnTermination: bm.EBS.DeleteOnTermination, Encrypted: bm.EBS.Encrypted, Iops: bm.EBS.IOps, + Throughput: bm.EBS.ThroughputMBps, KmsKeyId: bm.EBS.KmsKeyID, SnapshotId: bm.EBS.SnapshotID, VolumeSize: bm.EBS.VolumeSize, diff --git a/pkg/clients/ec2/instance_test.go b/pkg/clients/ec2/instance_test.go index 5f69a3d326..30d1f16717 100644 --- a/pkg/clients/ec2/instance_test.go +++ b/pkg/clients/ec2/instance_test.go @@ -573,6 +573,7 @@ func TestGenerateEC2RunInstancesInput(t *testing.T) { DeleteOnTermination: aws.Bool(false), Encrypted: aws.Bool(false), IOps: aws.Int32(1), + ThroughputMBps: aws.Int32(100), KmsKeyID: aws.String(keyName), SnapshotID: aws.String(snapshotID), VolumeSize: aws.Int32(1), @@ -716,6 +717,7 @@ func TestGenerateEC2RunInstancesInput(t *testing.T) { DeleteOnTermination: aws.Bool(false), Encrypted: aws.Bool(false), Iops: aws.Int32(1), + Throughput: aws.Int32(100), KmsKeyId: aws.String(keyName), SnapshotId: aws.String(snapshotID), VolumeSize: aws.Int32(1),