diff --git a/.gitignore b/.gitignore
index fb51a2b4..c157df28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,4 +47,4 @@ terraform.tfvars
*.conf
# Testing output files
-test/test_output/*
\ No newline at end of file
+test/test_output/*
diff --git a/docs/CONFIG-VARS.md b/docs/CONFIG-VARS.md
index eeaa1da0..3948b406 100644
--- a/docs/CONFIG-VARS.md
+++ b/docs/CONFIG-VARS.md
@@ -297,7 +297,7 @@ Additional node pools can be created separately from the default node pool. This
|
Name
| Description
| Type
| Default
| Notes
|
| :--- | :--- | :--- | :--- | :--- |
| vm_type | Type of the node pool VMs | string | | https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html |
-| cpu_type | Processor type CPU/GPU | string | AL2_x86_64| [AMI type](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) – Choose Amazon Linux 2 (AL2_x86_64) for Linux non-GPU instances, Amazon Linux 2 GPU Enabled (AL2_x86_64_GPU) for Linux GPU instances|
+| cpu_type | Processor type CPU/GPU | string | AL2023_x86_64_STANDARD| [AMI type](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) – Choose Amazon Linux 2 (AL2023_x86_64_STANDARD) for Linux non-GPU instances, Amazon Linux 2 GPU Enabled (AL2023_x86_64_STANDARD_GPU) for Linux GPU instances|
| os_disk_type | Disk type for node pool VMs | string | | `gp2` or `io1` |
| os_disk_size | Disk size for node pool VMs in GB | number | | |
| os_disk_iops | Amount of provisioned [IOPS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html) | number | | For `io1`, you MUST set the value to your desired IOPS value. Reference [Amazon EBS volume types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html) for details on values based on the `os_disk_type` selected.|
@@ -439,4 +439,4 @@ postgres_servers = {
| Name
| Description
| Type
| Default
| Notes
|
| :--- | :--- | :--- | :--- | :--- |
-| cluster_enabled_log_types | List of audits to record from EKS cluster in CloudWatch | list(string) | | More information on the audit types can be [found here.](https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html) |
\ No newline at end of file
+| cluster_enabled_log_types | List of audits to record from EKS cluster in CloudWatch | list(string) | | More information on the audit types can be [found here.](https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html) |
diff --git a/examples/sample-input-byo.tfvars b/examples/sample-input-byo.tfvars
index 871dd576..5c518442 100644
--- a/examples/sample-input-byo.tfvars
+++ b/examples/sample-input-byo.tfvars
@@ -16,7 +16,7 @@ subnet_ids = { # only needed if using pre-existing subnets
"database" : ["existing-database-subnet-id1", "existing-database-subnet-id2"] # only when 'create_postgres=true'
}
nat_id = ""
-security_group_id = "" # only needed if using pre-existing Security Group
+security_group_id = "" # only needed if using pre-existing Security Group
cluster_security_group_id = "" # only needed if using pre-existing Cluster Security Group
workers_security_group_id = "" # only needed if using pre-existing Security Group for Node Group VMs
@@ -52,7 +52,7 @@ storage_type = "standard"
node_pools = {
cas = {
"vm_type" = "r6idn.2xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -69,7 +69,7 @@ node_pools = {
},
compute = {
"vm_type" = "m6idn.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -87,7 +87,7 @@ node_pools = {
},
stateless = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -104,7 +104,7 @@ node_pools = {
},
stateful = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
diff --git a/examples/sample-input-connect.tfvars b/examples/sample-input-connect.tfvars
index cebf9c23..6108a12e 100644
--- a/examples/sample-input-connect.tfvars
+++ b/examples/sample-input-connect.tfvars
@@ -40,7 +40,7 @@ storage_type = "standard"
node_pools = {
cas = {
"vm_type" = "r6idn.2xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -57,7 +57,7 @@ node_pools = {
},
compute = {
"vm_type" = "m6idn.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -75,7 +75,7 @@ node_pools = {
},
connect = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -93,7 +93,7 @@ node_pools = {
},
stateless = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -110,7 +110,7 @@ node_pools = {
},
stateful = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
diff --git a/examples/sample-input-custom-data.tfvars b/examples/sample-input-custom-data.tfvars
index 85578a85..29fc15e0 100644
--- a/examples/sample-input-custom-data.tfvars
+++ b/examples/sample-input-custom-data.tfvars
@@ -40,7 +40,7 @@ storage_type = "standard"
node_pools = {
cas = {
"vm_type" = "r6idn.2xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -57,7 +57,7 @@ node_pools = {
},
compute = {
"vm_type" = "m6idn.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -75,7 +75,7 @@ node_pools = {
},
stateless = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -92,7 +92,7 @@ node_pools = {
},
stateful = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
diff --git a/examples/sample-input-gpu.tfvars b/examples/sample-input-gpu.tfvars
index 66282572..ff01942b 100644
--- a/examples/sample-input-gpu.tfvars
+++ b/examples/sample-input-gpu.tfvars
@@ -40,7 +40,7 @@ storage_type = "standard"
node_pools = {
cas = {
"vm_type" = "r6idn.2xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -57,7 +57,7 @@ node_pools = {
},
gpu_cas = {
"vm_type" = "p2.8xlarge"
- "cpu_type" = "AL2_x86_64_GPU"
+ "cpu_type" = "AL2023_x86_64_STANDARD_GPU"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -74,7 +74,7 @@ node_pools = {
},
compute = {
"vm_type" = "m6idn.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -92,7 +92,7 @@ node_pools = {
},
stateless = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -109,7 +109,7 @@ node_pools = {
},
stateful = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
diff --git a/examples/sample-input-ha.tfvars b/examples/sample-input-ha.tfvars
index 45e2c7f2..86700940 100644
--- a/examples/sample-input-ha.tfvars
+++ b/examples/sample-input-ha.tfvars
@@ -40,7 +40,7 @@ storage_type = "ha"
node_pools = {
cas = {
"vm_type" = "r6idn.2xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -57,7 +57,7 @@ node_pools = {
},
compute = {
"vm_type" = "m6idn.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -75,7 +75,7 @@ node_pools = {
},
stateless = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -92,7 +92,7 @@ node_pools = {
},
stateful = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
diff --git a/examples/sample-input-minimal.tfvars b/examples/sample-input-minimal.tfvars
index 3b49205c..f630fc6c 100644
--- a/examples/sample-input-minimal.tfvars
+++ b/examples/sample-input-minimal.tfvars
@@ -41,7 +41,7 @@ cluster_node_pool_mode = "minimal"
node_pools = {
cas = {
"vm_type" = "r6idn.2xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -58,7 +58,7 @@ node_pools = {
},
generic = {
"vm_type" = "m6idn.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
diff --git a/examples/sample-input-singlestore.tfvars b/examples/sample-input-singlestore.tfvars
index 93509827..9335762d 100644
--- a/examples/sample-input-singlestore.tfvars
+++ b/examples/sample-input-singlestore.tfvars
@@ -40,7 +40,7 @@ storage_type = "standard"
node_pools = {
cas = {
"vm_type" = "r6idn.2xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -57,7 +57,7 @@ node_pools = {
},
compute = {
"vm_type" = "m6idn.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -75,7 +75,7 @@ node_pools = {
},
stateless = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -92,7 +92,7 @@ node_pools = {
},
stateful = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -109,7 +109,7 @@ node_pools = {
},
singlestore = {
"vm_type" = "r6idn.4xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
diff --git a/examples/sample-input.tfvars b/examples/sample-input.tfvars
index 6a82a931..e80f5091 100644
--- a/examples/sample-input.tfvars
+++ b/examples/sample-input.tfvars
@@ -40,7 +40,7 @@ storage_type = "standard"
node_pools = {
cas = {
"vm_type" = "r6idn.2xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -57,7 +57,7 @@ node_pools = {
},
compute = {
"vm_type" = "m6idn.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -75,7 +75,7 @@ node_pools = {
},
stateless = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
@@ -92,7 +92,7 @@ node_pools = {
},
stateful = {
"vm_type" = "m6in.xlarge"
- "cpu_type" = "AL2_x86_64"
+ "cpu_type" = "AL2023_x86_64_STANDARD"
"os_disk_type" = "gp2"
"os_disk_size" = 200
"os_disk_iops" = 0
diff --git a/locals.tf b/locals.tf
index 443a3931..cbd796d4 100755
--- a/locals.tf
+++ b/locals.tf
@@ -9,7 +9,7 @@ locals {
caller_is_user = strcontains(data.aws_caller_identity.terraform.arn, ":user")
# AWS caller role name derived from ARN value
- aws_caller_role_name = local.caller_is_user ? "" : element(split("/", data.aws_caller_identity.terraform.arn), length(split("/", data.aws_caller_identity.terraform.arn)) - 2)
+ aws_caller_role_name = local.caller_is_user ? "" : element(split("/", data.aws_caller_identity.terraform.arn), length(split("/", data.aws_caller_identity.terraform.arn)) - 2)
# General
security_group_id = var.security_group_id == null ? aws_security_group.sg[0].id : data.aws_security_group.sg[0].id
@@ -72,6 +72,7 @@ locals {
default = {
name = "default"
instance_types = [var.default_nodepool_vm_type]
+ ami_type = var.default_nodepool_cpu_type
block_device_mappings = {
xvda = {
device_name = "/dev/xvda"
@@ -92,7 +93,8 @@ locals {
"effect" = length(regexall(":No", taint)) > 0 ? upper(replace(split(":", split("=", taint)[1])[1], "No", "NO_")) : upper(replace(split(":", split("=", taint)[1])[1], "No", "_NO_"))
}
}
- labels = var.default_nodepool_labels
+ labels = var.default_nodepool_labels
+ schedules = var.default_nodepool_schedules
# User data
bootstrap_extra_args = "--kubelet-extra-args '--node-labels=${replace(replace(jsonencode(var.default_nodepool_labels), "/[\"\\{\\}]/", ""), ":", "=")} --register-with-taints=${join(",", var.default_nodepool_taints)} ' "
pre_bootstrap_user_data = (var.default_nodepool_custom_data != "" ? file(var.default_nodepool_custom_data) : "")
@@ -142,7 +144,8 @@ locals {
"effect" = length(regexall(":No", taint)) > 0 ? upper(replace(split(":", split("=", taint)[1])[1], "No", "NO_")) : upper(replace(split(":", split("=", taint)[1])[1], "No", "_NO_"))
}
}
- labels = np_value.node_labels
+ labels = np_value.node_labels
+ schedules = np_value.schedules
# User data
bootstrap_extra_args = "--kubelet-extra-args '--node-labels=${replace(replace(jsonencode(np_value.node_labels), "/[\"\\{\\}]/", ""), ":", "=")} --register-with-taints=${join(",", np_value.node_taints)}' "
pre_bootstrap_user_data = (np_value.custom_data != "" ? file(np_value.custom_data) : "")
@@ -172,7 +175,6 @@ locals {
v.server_port
] : [] : []
postgres_cidr_port_pairs = setproduct(local.postgres_sgr_ports, local.postgres_public_access_cidrs)
-
ingress_pairs = length(local.postgres_cidr_port_pairs) != 0 ? { for pair in local.postgres_cidr_port_pairs :
"${pair[0]}-${pair[1]}" => {
"server_port" : pair[0],
@@ -180,7 +182,6 @@ locals {
}
} : {}
-
postgres_outputs = length(module.postgresql) != 0 ? { for k, v in module.postgresql :
k => {
"server_name" : module.postgresql[k].db_instance_identifier,
diff --git a/main.tf b/main.tf
index 360c16be..c90c42fb 100755
--- a/main.tf
+++ b/main.tf
@@ -8,12 +8,12 @@
#
provider "aws" {
- region = var.location
- profile = var.aws_profile
+ region = var.location
+ profile = var.aws_profile
shared_credentials_files = local.aws_shared_credentials
- access_key = var.aws_access_key_id
- secret_key = var.aws_secret_access_key
- token = var.aws_session_token
+ # access_key = var.aws_access_key_id
+ # secret_key = var.aws_secret_access_key
+ # token = var.aws_session_token
}
@@ -33,27 +33,6 @@ data "external" "iac_tooling_version" {
program = ["files/tools/iac_tooling_version.sh"]
}
-resource "kubernetes_config_map" "sas_iac_buildinfo" {
- metadata {
- name = "sas-iac-buildinfo"
- namespace = "kube-system"
- }
-
- data = {
- git-hash = data.external.git_hash.result["git-hash"]
- timestamp = chomp(timestamp())
- iac-tooling = var.iac_tooling
- terraform = <