mirror of
https://github.com/storytold/terraform-aws-observability-accelerator.git
synced 2026-10-23 08:05:11 +00:00
Added parameter for instance type (#91)
* Added parameter for instance type See #89. Added a variable to change the default instance type for the EKS Cluster * Added additional parameters for size and version
This commit is contained in:
@@ -32,6 +32,22 @@ Specify the AWS Region where the resources will be deployed:
|
|||||||
export TF_VAR_aws_region=xxx
|
export TF_VAR_aws_region=xxx
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 3. Instance Type
|
||||||
|
|
||||||
|
Depending on your region or limitations in your account, you might need to change to a different instance type.
|
||||||
|
To do this, you can define the instance type to use:
|
||||||
|
```bash
|
||||||
|
export TF_VAR_managed_node_instance_type=xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Anazon Elastic Kubernetes Service (Amazon EKS) Version
|
||||||
|
|
||||||
|
You can override the version of the cluster also:
|
||||||
|
```bash
|
||||||
|
export TF_VAR_eks_version=xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Deploy
|
## Deploy
|
||||||
|
|
||||||
Simply run this command to deploy the example
|
Simply run this command to deploy the example
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ module "eks_blueprints" {
|
|||||||
source = "github.com/aws-ia/terraform-aws-eks-blueprints?ref=v4.13.1"
|
source = "github.com/aws-ia/terraform-aws-eks-blueprints?ref=v4.13.1"
|
||||||
|
|
||||||
cluster_name = local.cluster_name
|
cluster_name = local.cluster_name
|
||||||
cluster_version = "1.24"
|
cluster_version = var.eks_version
|
||||||
|
|
||||||
vpc_id = module.vpc.vpc_id
|
vpc_id = module.vpc.vpc_id
|
||||||
private_subnet_ids = module.vpc.private_subnets
|
private_subnet_ids = module.vpc.private_subnets
|
||||||
@@ -52,8 +52,8 @@ module "eks_blueprints" {
|
|||||||
managed_node_groups = {
|
managed_node_groups = {
|
||||||
mg_5 = {
|
mg_5 = {
|
||||||
node_group_name = "managed-ondemand"
|
node_group_name = "managed-ondemand"
|
||||||
instance_types = ["t3.xlarge"]
|
instance_types = [var.managed_node_instance_type]
|
||||||
min_size = 2
|
min_size = var.managed_node_min_size
|
||||||
subnet_ids = module.vpc.private_subnets
|
subnet_ids = module.vpc.private_subnets
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,3 +7,18 @@ variable "aws_region" {
|
|||||||
description = "AWS Region"
|
description = "AWS Region"
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
variable "managed_node_instance_type" {
|
||||||
|
description = "Instance type for the cluster managed node groups"
|
||||||
|
type = string
|
||||||
|
default = "t3.xlarge"
|
||||||
|
}
|
||||||
|
variable "managed_node_min_size" {
|
||||||
|
description = "Minumum number of instances in the node group"
|
||||||
|
type = number
|
||||||
|
default = 2
|
||||||
|
}
|
||||||
|
variable "eks_version" {
|
||||||
|
type = string
|
||||||
|
description = "EKS Cluster version"
|
||||||
|
default = "1.24"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user