mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-21 00:49:06 +01:00
feat: Add support for creating efa-only network interfaces (#3196)
This commit is contained in:
@@ -44,13 +44,14 @@ locals {
|
||||
efa_instance_type = try(element(var.instance_types, 0), "")
|
||||
num_network_cards = try(data.aws_ec2_instance_type.this[0].maximum_network_cards, 0)
|
||||
|
||||
# Primary network interface must be EFA, remaining can be EFA or EFA-only
|
||||
efa_network_interfaces = [
|
||||
for i in range(local.num_network_cards) : {
|
||||
associate_public_ip_address = false
|
||||
delete_on_termination = true
|
||||
device_index = i == 0 ? 0 : 1
|
||||
network_card_index = i
|
||||
interface_type = "efa"
|
||||
interface_type = var.enable_efa_only ? contains(concat([0], var.efa_indices), i) ? "efa" : "efa-only" : "efa"
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user