# Volume

### Creating a gp3 volume

```
resources:
  # gp3 - Default (3,000 IOPS, 125 MB/s baseline included)
  - name: gp3-default-volume
    type: aws_ec2_volume
    props:
      availability_zone: "us-east-1a"
      size: 100
      volume_type: "gp3"
      # iops: 3000 (default, included in storage price)
      # throughput: 125 (default, included in storage price)

  # gp3 - With additional IOPS and throughput
  - name: gp3-enhanced-volume
    type: aws_ec2_volume
    props:
      availability_zone: "us-east-1a"
      size: 200
      volume_type: "gp3"
      iops: 5000  # 2,000 above baseline
      throughput: 150  # 25 MB/s above baseline
```

#### Example price for above configuration

```
gp3-default-volume (action: create, monthly: $8.00, change: +100%)
=> Price (Storage cost (gp3) - price: $0.08/GB-Mo, quantity: 100, monthly: $8.00)
=> Price (IOPS - monthly: $0.00)
  => Tier 1 (First 3000 IOPS-Mo - price: $0.00/IOPS-Mo, quantity: 3000, monthly: $0.00)
=> Price (Throughput - monthly: $0.00)
  => Tier 1 (First 125 MiBps-mo - price: $0.00/MiBps-mo, quantity: 125, monthly: $0.00)
gp3-enhanced-volume (action: create, monthly: $27.00, change: +100%)
=> Price (Storage cost (gp3) - price: $0.08/GB-Mo, quantity: 200, monthly: $16.00)
=> Price (IOPS - monthly: $10.00)
  => Tier 1 (First 3000 IOPS-Mo - price: $0.00/IOPS-Mo, quantity: 3000, monthly: $0.00)
  => Tier 2 (Over 3000 IOPS-Mo - price: $0.005/IOPS-Mo, quantity: 2000, monthly: $10.00)
=> Price (Throughput - monthly: $1.00)
  => Tier 1 (First 125 MiBps-mo - price: $0.00/MiBps-mo, quantity: 125, monthly: $0.00)
  => Tier 2 (Over 125 MiBps-mo - price: $0.04/MiBps-mo, quantity: 25, monthly: $1.00)
```

### Creating a gp2 volume

```
resources:
  # gp2 - Previous generation (IOPS included in storage price)
  - name: gp2-volume
    type: aws_ec2_volume
    props:
      availability_zone: "us-east-1a"
      size: 100
      volume_type: "gp2"
```

#### Example price for above configuration

```
gp2-volume (action: create, monthly: $10.00)
=> Price (Storage cost (gp2) - price: $0.10/GB-Mo, quantity: 100, monthly: $10.00)
```

### Creating an io2 volume

```
resources:
  # io2 - Provisioned IOPS (10,000 IOPS - single tier)
  - name: io2-volume-10k
    type: aws_ec2_volume
    props:
      availability_zone: "us-east-1a"
      size: 100
      volume_type: "io2"
      iops: 10000

  # io2 - Provisioned IOPS (50,000 IOPS - tiered pricing)
  - name: io2-volume-50k
    type: aws_ec2_volume
    props:
      availability_zone: "us-east-1a"
      size: 200
      volume_type: "io2"
      iops: 50000  # Spans multiple tiers: 32K + 18K
```

#### Example price for above configuration

```
io2-volume-10k (action: create, monthly: $662.50)
=> Price (Storage cost (io2) - price: $0.125/GB-Mo, quantity: 100, monthly: $12.50)
=> Price (IOPS - monthly: $650.00)
  => Tier 1 (First 32000 IOPS-Mo - price: $0.065/IOPS-Mo, quantity: 10000, monthly: $650.00)
io2-volume-50k (action: create, monthly: $2,899.00)
=> Price (Storage cost (io2) - price: $0.125/GB-Mo, quantity: 200, monthly: $25.00)
=> Price (IOPS - monthly: $2,874.00)
  => Tier 1 (First 32000 IOPS-Mo - price: $0.065/IOPS-Mo, quantity: 32000, monthly: $2,080.00)
  => Tier 2 (Next 32000 IOPS-Mo - price: $0.0455/IOPS-Mo, quantity: 18000, monthly: $819.00)
```

### Creating a io1 volume

```
resources:
  # io1 - Provisioned IOPS (previous generation)
  - name: io1-volume
    type: aws_ec2_volume
    props:
      availability_zone: "us-east-1a"
      size: 100
      volume_type: "io1"
      iops: 5000
```

#### Example price for above configuration

```
io1-volume (action: create, monthly: $337.50)
=> Price (Storage cost (io1) - price: $0.125/GB-Mo, quantity: 100, monthly: $12.50)
=> Price (IOPS - price: $0.065/IOPS-Mo, quantity: 5000, monthly: $325.00)
```

### Creating a st1 volume

```
resources:
  # st1 - Throughput Optimized HDD
  - name: st1-volume
    type: aws_ec2_volume
    props:
      availability_zone: "us-east-1a"
      size: 500  # Minimum 125 GB
      volume_type: "st1"
```

#### Example price for above configuration

```
st1-volume (action: create, monthly: $22.50)
=> Price (Storage cost (st1) - price: $0.045/GB-Mo, quantity: 500, monthly: $22.50)
```

### Creating a sc1 volume

```
resources:
  # sc1 - Cold HDD
  - name: sc1-volume
    type: aws_ec2_volume
    props:
      availability_zone: "us-east-1a"
      size: 500  # Minimum 125 GB
      volume_type: "sc1"
```

#### Example price for above configuration

```
sc1-volume (action: create, monthly: $7.50)
=> Price (Storage cost (sc1) - price: $0.015/GB-Mo, quantity: 500, monthly: $7.50)
```
