Skip to content

Commit

Permalink
ec2_fleet: add docs for 'instance_requirements'
Browse files Browse the repository at this point in the history
  • Loading branch information
cjerad committed May 10, 2022
1 parent 6de68ca commit c179afa
Showing 1 changed file with 102 additions and 0 deletions.
102 changes: 102 additions & 0 deletions website/docs/r/ec2_fleet.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,114 @@ resource "aws_ec2_fleet" "example" {
```

* `availability_zone` - (Optional) Availability Zone in which to launch the instances.
* `instance_requirements` - (Optional) Override the instance type in the Launch Template with instance types that satisfy the requirements.
* `instance_type` - (Optional) Instance type.
* `max_price` - (Optional) Maximum price per unit hour that you are willing to pay for a Spot Instance.
* `priority` - (Optional) Priority for the launch template override. If `on_demand_options` `allocation_strategy` is set to `prioritized`, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity. The highest priority is launched first. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. Valid values are whole numbers starting at 0.
* `subnet_id` - (Optional) ID of the subnet in which to launch the instances.
* `weighted_capacity` - (Optional) Number of units provided by the specified instance type.

##### instance_requirements

This configuration block supports the following:

~> **NOTE**: Both `memory_mib.min` and `vcpu_count.min` must be specified.

* `accelerator_count` - (Optional) Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
* `min` - (Optional) Minimum.
* `max` - (Optional) Maximum. Set to `0` to exclude instance types with accelerators.
* `accelerator_manufacturers` - (Optional) List of accelerator manufacturer names. Default is any manufacturer.

```
Valid names:
* amazon-web-services
* amd
* nvidia
* xilinx
```
* `accelerator_names` - (Optional) List of accelerator names. Default is any acclerator.
```
Valid names:
* a100 - NVIDIA A100 GPUs
* v100 - NVIDIA V100 GPUs
* k80 - NVIDIA K80 GPUs
* t4 - NVIDIA T4 GPUs
* m60 - NVIDIA M60 GPUs
* radeon-pro-v520 - AMD Radeon Pro V520 GPUs
* vu9p - Xilinx VU9P FPGAs
```
* `accelerator_total_memory_mib` - (Optional) Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
* `min` - (Optional) Minimum.
* `max` - (Optional) Maximum.
* `accelerator_types` - (Optional) List of accelerator types. Default is any accelerator type.
```
Valid types:
* fpga
* gpu
* inference
```
* `bare_metal` - (Optional) Indicate whether bare metal instace types should be `included`, `excluded`, or `required`. Default is `excluded`.
* `baseline_ebs_bandwidth_mbps` - (Optional) Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
* `min` - (Optional) Minimum.
* `max` - (Optional) Maximum.
* `burstable_performance` - (Optional) Indicate whether burstable performance instance types should be `included`, `excluded`, or `required`. Default is `excluded`.
* `cpu_manufacturers` (Optional) List of CPU manufacturer names. Default is any manufacturer.
~> **NOTE**: Don't confuse the CPU hardware manufacturer with the CPU hardware architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.
```
Valid names:
* amazon-web-services
* amd
* intel
```
* `excluded_instance_types` - (Optional) List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (\*). The following are examples: `c5*`, `m5a.*`, `r*`, `*3*`. For example, if you specify `c5*`, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify `m5a.*`, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.
* `instance_generations` - (Optional) List of instance generation names. Default is any generation.
```
Valid names:
* current - Recommended for best performance.
* previous - For existing applications optimized for older instance types.
```
* `local_storage` - (Optional) Indicate whether instance types with local storage volumes are `included`, `excluded`, or `required`. Default is `included`.
* `local_storage_types` - (Optional) List of local storage type names. Default any storage type.
```
Value names:
* hdd - hard disk drive
* ssd - solid state drive
```
* `memory_gib_per_vcpu` - (Optional) Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
* `min` - (Optional) Minimum. May be a decimal number, e.g. `0.5`.
* `max` - (Optional) Maximum. May be a decimal number, e.g. `0.5`.
* `memory_mib` - (Required) Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
* `min` - (Required) Minimum.
* `max` - (Optional) Maximum.
* `network_interface_count` - (Optional) Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
* `min` - (Optional) Minimum.
* `max` - (Optional) Maximum.
* `on_demand_max_price_percentage_over_lowest_price` - (Optional) The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.
If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.
* `require_hibernate_support` - (Optional) Indicate whether instance types must support On-Demand Instance Hibernation, either `true` or `false`. Default is `false`.
* `spot_max_price_percentage_over_lowest_price` - (Optional) The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.
If you set DesiredCapacityType to vcpu or memory-mib, the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.
* `total_local_storage_gb` - (Optional) Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
* `min` - (Optional) Minimum. May be a decimal number, e.g. `0.5`.
* `max` - (Optional) Maximum. May be a decimal number, e.g. `0.5`.
* `vcpu_count` - (Required) Block describing the minimum and maximum number of vCPUs. Default is no maximum.
* `min` - (Required) Minimum.
* `max` - (Optional) Maximum.
### on_demand_options
* `allocation_strategy` - (Optional) The order of the launch template overrides to use in fulfilling On-Demand capacity. Valid values: `lowestPrice`, `prioritized`. Default: `lowestPrice`.
Expand Down

0 comments on commit c179afa

Please sign in to comment.