Skip to content
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

network_card_index support in aws_instance and aws_network_interface_attachment #24043

Closed
nkorobko opened this issue Apr 6, 2022 · 6 comments · Fixed by #24283
Closed

network_card_index support in aws_instance and aws_network_interface_attachment #24043

nkorobko opened this issue Apr 6, 2022 · 6 comments · Fixed by #24283
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@nkorobko
Copy link

nkorobko commented Apr 6, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Missing network_card_index attribute in network_interface block. This is needed in order to create ec2 nodes that have more than 1 network card (dl1.24xlarge). Due to the fact that you can not attach more than 1 EFA on a single network card - it is impossible to create an ec2 from dl1.24xlarge type with 4 EFA adapters attached using aws_instance. The only workaround for this is to create aws_launch_template, where network_card_index is supported in the network_interface block

New or Affected Resource(s)

  • aws_instance
  • aws_network_interface_attachment

Potential Terraform Configuration

Currently, this is only supported by aws_launch_template. I would like to see this support in aws_instance and in aws_network_interface_attachment

 network_interfaces {
    network_interface_id        = var.mgmt_efa_host_list[2]
    device_index                = 2
    **network_card_index**          = 2
  }

References

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#network-interfaces
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template#network-interfaces

  • #0000
@nkorobko nkorobko added the enhancement Requests to existing resources that expand the functionality or scope. label Apr 6, 2022
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/ec2 Issues and PRs that pertain to the ec2 service. labels Apr 6, 2022
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Apr 8, 2022
@ewbankkit
Copy link
Contributor

device_index is already available in the aws_network_interface_attachment resource: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_interface_attachment#device_index

@ewbankkit
Copy link
Contributor

Relates: #21147.

@nkorobko
Copy link
Author

@ewbankkit yes, I'm aware of that, the missing attribute is network_card_index. This is not the same as device_index

@github-actions github-actions bot added this to the v4.11.0 milestone Apr 20, 2022
@github-actions
Copy link

This functionality has been released in v4.11.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!

@zeroflaw
Copy link

zeroflaw commented May 1, 2022

When using network_interface block in aws_spot_instance_request i'm now getting the error:

Error: Error requesting spot instances: UnknownParameter: The parameter NetworkCardIndex is not recognized │ status code: 400, request id: 904aa9a5-fc2f-4668-b9a4-4fc0e8cef3e5

I'm not sure how to work around the issue.

Seems related to boto/boto3#2897 (comment)

@github-actions
Copy link

github-actions bot commented Jun 1, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants