Skip to content

Commit e562a63

Browse files
PascalBourdierOlesia Ivanenko
authored and
Olesia Ivanenko
committed
fix: Fixed launch_templates_with_managed_node_group example (terraform-aws-modules#1599)
1 parent 2aed426 commit e562a63

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

examples/launch_templates_with_managed_node_groups/disk_encryption_policy.tf

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
resource "aws_iam_service_linked_role" "autoscaling" {
33
aws_service_name = "autoscaling.amazonaws.com"
44
description = "Default Service-Linked Role enables access to AWS Services and Resources used or managed by Auto Scaling"
5+
custom_suffix = "lt_with_managed_node_groups" # the full name is "AWSServiceRoleForAutoScaling_lt_with_managed_node_groups" < 64 characters
56
}
67

78
#data "aws_caller_identity" "current" {}

examples/launch_templates_with_managed_node_groups/launchtemplate.tf

-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ resource "aws_launch_template" "default" {
3737
}
3838
}
3939

40-
instance_type = var.instance_type
41-
4240
monitoring {
4341
enabled = true
4442
}

examples/launch_templates_with_managed_node_groups/main.tf

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ module "eks" {
6262
launch_template_id = aws_launch_template.default.id
6363
launch_template_version = aws_launch_template.default.default_version
6464

65+
instance_types = var.instance_types
66+
6567
additional_tags = {
6668
CustomTag = "EKS example"
6769
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
variable "instance_type" {
2-
description = "Instance type"
1+
variable "instance_types" {
2+
description = "Instance types"
33
# Smallest recommended, where ~1.1Gb of 2Gb memory is available for the Kubernetes pods after ‘warming up’ Docker, Kubelet, and OS
4-
type = string
5-
default = "t3.small"
4+
type = list(string)
5+
default = ["t3.small"]
66
}

0 commit comments

Comments
 (0)