-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add attributes to the aws_ec2_instance_type data source #40717
Add attributes to the aws_ec2_instance_type data source #40717
Conversation
Community NoteVoting for Prioritization
For Submitters
|
71e547f
to
54a4d16
Compare
54a4d16
to
c419741
Compare
Added the following attributes to the `aws_ec2_instance_type` data source to bring it up-to-date with the EC2 API. * `bandwidth_weightings` * `boot_modes` * `default_network_card_index` * `efa_maximum_interfaces` * `inference_accelerators.#.memory_size` * `media_accelerators.#.count` * `media_accelerators.#.manufacturer` * `media_accelerators.#.memory_size` * `media_accelerators.#.name` * `network_cards.#.baseline_bandwidth` * `network_cards.#.index` * `network_cards.#.maximum_interfaces` * `network_cards.#.performance` * `network_cards.#.peak_bandwidth` * `neuron_devices.#.core_count` * `neuron_devices.#.count` * `neuron_devices.#.memory_size` * `neuron_devices.#.name` * `neuron_devices.#.version` * `nitro_enclaves_support` * `nitro_tpm_support` * `nitro_tpm_supported_versions` * `phc_support` * `srd_supported` * `supported_cpu_features` * `total_inference_memory` * `total_media_memory` * `total_neuron_device_memory`
c419741
to
a2e9697
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccEC2InstanceTypeDataSource_' PKG=ec2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run=TestAccEC2InstanceTypeDataSource_ -timeout 360m -vet=off
2025/01/12 17:00:29 Initializing Terraform AWS Provider...
=== RUN TestAccEC2InstanceTypeDataSource_basic
=== PAUSE TestAccEC2InstanceTypeDataSource_basic
=== RUN TestAccEC2InstanceTypeDataSource_metal
=== PAUSE TestAccEC2InstanceTypeDataSource_metal
=== RUN TestAccEC2InstanceTypeDataSource_gpu
=== PAUSE TestAccEC2InstanceTypeDataSource_gpu
=== RUN TestAccEC2InstanceTypeDataSource_fpga
=== PAUSE TestAccEC2InstanceTypeDataSource_fpga
=== RUN TestAccEC2InstanceTypeDataSource_neuron
=== PAUSE TestAccEC2InstanceTypeDataSource_neuron
=== RUN TestAccEC2InstanceTypeDataSource_media_accelerator
=== PAUSE TestAccEC2InstanceTypeDataSource_media_accelerator
=== CONT TestAccEC2InstanceTypeDataSource_basic
=== CONT TestAccEC2InstanceTypeDataSource_fpga
=== CONT TestAccEC2InstanceTypeDataSource_media_accelerator
=== CONT TestAccEC2InstanceTypeDataSource_neuron
=== CONT TestAccEC2InstanceTypeDataSource_gpu
=== CONT TestAccEC2InstanceTypeDataSource_metal
--- PASS: TestAccEC2InstanceTypeDataSource_media_accelerator (10.55s)
--- PASS: TestAccEC2InstanceTypeDataSource_metal (10.56s)
--- PASS: TestAccEC2InstanceTypeDataSource_gpu (10.57s)
--- PASS: TestAccEC2InstanceTypeDataSource_fpga (10.57s)
--- PASS: TestAccEC2InstanceTypeDataSource_basic (10.57s)
--- PASS: TestAccEC2InstanceTypeDataSource_neuron (10.57s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 16.631s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
@bakeemawaytoys Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.84.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Description
Added the following attributes to the
aws_ec2_instance_type
data source to bring it up-to-date with the EC2 API. I tried to follow the data source's established conventions with respect to nullability, naming, and flattening attributes that are nested in the AWS API. One thing I'm not clear on is which type to use for attributes that are collections of strings. I went with sets instead of lists because ordering doesn't make sense nor is it explicitly guaranteed by the AWS API. Existing attributes tended be lists. I can change them to lists if consistency is more important.As I was updating the documentation, I adjusted some of the descriptions of existing attributes to clarify their data types and/or their expected values. My intent is to reduce the need to cross-reference the data source's documentation with the AWS API documentation in order to understand the attribute values.
bandwidth_weightings
boot_modes
default_network_card_index
efa_maximum_interfaces
ena_srd_supported
inference_accelerators.#.memory_size
media_accelerators.#.count
media_accelerators.#.manufacturer
media_accelerators.#.memory_size
media_accelerators.#.name
network_cards.#.baseline_bandwidth
network_cards.#.index
network_cards.#.maximum_interfaces
network_cards.#.performance
network_cards.#.peak_bandwidth
neuron_devices.#.core_count
neuron_devices.#.core_version
neuron_devices.#.count
neuron_devices.#.memory_size
neuron_devices.#.name
nitro_enclaves_support
nitro_tpm_support
nitro_tpm_supported_versions
phc_support
supported_cpu_features
total_inference_memory
total_media_memory
total_neuron_device_memory
Relations
Closes #35640
References
AWS CLI documentation for the
describe-instance-type
commandAWS EC2 API documentation for the
DescribeInstanceTypes
actionOutput from Acceptance Testing