File tree Expand file tree Collapse file tree 3 files changed +34
-3
lines changed
examples/eks-cluster-with-vpc Expand file tree Collapse file tree 3 files changed +34
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,22 @@ Specify the AWS Region where the resources will be deployed:
32
32
export TF_VAR_aws_region=xxx
33
33
```
34
34
35
+ ### 3. Instance Type
36
+
37
+ Depending on your region or limitations in your account, you might need to change to a different instance type.
38
+ To do this, you can define the instance type to use:
39
+ ``` bash
40
+ export TF_VAR_managed_node_instance_type=xxx
41
+ ```
42
+
43
+ ### 4. Anazon Elastic Kubernetes Service (Amazon EKS) Version
44
+
45
+ You can override the version of the cluster also:
46
+ ``` bash
47
+ export TF_VAR_eks_version=xxx
48
+ ```
49
+
50
+
35
51
## Deploy
36
52
37
53
Simply run this command to deploy the example
Original file line number Diff line number Diff line change @@ -44,16 +44,16 @@ module "eks_blueprints" {
44
44
source = " github.com/aws-ia/terraform-aws-eks-blueprints?ref=v4.13.1"
45
45
46
46
cluster_name = local. cluster_name
47
- cluster_version = " 1.24 "
47
+ cluster_version = var . eks_version
48
48
49
49
vpc_id = module. vpc . vpc_id
50
50
private_subnet_ids = module. vpc . private_subnets
51
51
52
52
managed_node_groups = {
53
53
mg_5 = {
54
54
node_group_name = " managed-ondemand"
55
- instance_types = [" t3.xlarge " ]
56
- min_size = 2
55
+ instance_types = [var.managed_node_instance_type ]
56
+ min_size = var.managed_node_min_size
57
57
subnet_ids = module.vpc.private_subnets
58
58
}
59
59
}
Original file line number Diff line number Diff line change @@ -7,3 +7,18 @@ variable "aws_region" {
7
7
description = " AWS Region"
8
8
type = string
9
9
}
10
+ variable "managed_node_instance_type" {
11
+ description = " Instance type for the cluster managed node groups"
12
+ type = string
13
+ default = " t3.xlarge"
14
+ }
15
+ variable "managed_node_min_size" {
16
+ description = " Minumum number of instances in the node group"
17
+ type = number
18
+ default = 2
19
+ }
20
+ variable "eks_version" {
21
+ type = string
22
+ description = " EKS Cluster version"
23
+ default = " 1.24"
24
+ }
You can’t perform that action at this time.
0 commit comments