diff --git a/locals.tf b/locals.tf index 60472a6..9bebfd0 100644 --- a/locals.tf +++ b/locals.tf @@ -94,6 +94,7 @@ locals { launch_template_placement_group = null # The name of the placement group into which to launch the instances, if any. root_encrypted = false # Whether the volume should be encrypted or not eni_delete = true # Delete the Elastic Network Interface (ENI) on termination (if set to false you will have to manually delete before destroying) + interface_type = null # The type of network interface. To create an Elastic Fabric Adapter (EFA), specify 'efa'. cpu_credits = "standard" # T2/T3 unlimited mode, can be 'standard' or 'unlimited'. Used 'standard' mode as default to avoid paying higher costs market_type = null metadata_http_endpoint = "enabled" # The state of the metadata service: enabled, disabled. diff --git a/workers_launch_template.tf b/workers_launch_template.tf index b675304..d713cf4 100644 --- a/workers_launch_template.tf +++ b/workers_launch_template.tf @@ -314,6 +314,11 @@ resource "aws_launch_template" "workers_launch_template" { "eni_delete", local.workers_group_defaults["eni_delete"], ) + interface_type = lookup( + var.worker_groups_launch_template[count.index], + "interface_type", + local.workers_group_defaults["interface_type"], + ) security_groups = flatten([ local.worker_security_group_id, var.worker_additional_security_group_ids,