feat: Allow interface_type to be specified in worker_groups_launch_template (#1439)

This commit is contained in:
Paul B Schroeder
2021-10-07 07:21:13 -05:00
committed by GitHub
parent 7f13ffd121
commit f37e5af88a
2 changed files with 6 additions and 0 deletions

View File

@@ -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.

View File

@@ -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,