Skip to content

Commit 4249ecb

Browse files
committed
feat: upgrade eks version to v1.31
1 parent a07ff58 commit 4249ecb

File tree

2 files changed

+54
-54
lines changed

2 files changed

+54
-54
lines changed

aws-github/terraform/aws/eks/main.tf

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ data "aws_availability_zones" "available" {}
1919

2020
locals {
2121
name = "<CLUSTER_NAME>"
22-
cluster_version = "1.29"
22+
cluster_version = "1.31"
2323
region = "<CLOUD_REGION>"
2424

2525
vpc_cidr = "10.0.0.0/16"
@@ -89,9 +89,9 @@ module "eks" {
8989
eks_managed_node_groups = {
9090
# Default node group - as provided by AWS EKS
9191
default_node_group = {
92-
desired_size = tonumber("<NODE_COUNT>") # tonumber() is used for a string token value
93-
min_size = tonumber("1") # tonumber() is used for a string token value
94-
max_size = tonumber("<NODE_COUNT>")+10 # tonumber() is used for a string token value
92+
desired_size = tonumber("<NODE_COUNT>") # tonumber() is used for a string token value
93+
min_size = tonumber("1") # tonumber() is used for a string token value
94+
max_size = tonumber("<NODE_COUNT>") + 10 # tonumber() is used for a string token value
9595
# By default, the module creates a launch template to ensure tags are propagated to instances, etc.,
9696
# so we need to disable it to use the default template provided by the AWS EKS managed node group service
9797
use_custom_launch_template = false
@@ -104,14 +104,14 @@ module "eks" {
104104
enable_cluster_creator_admin_permissions = true
105105

106106
access_entries = {
107-
107+
108108
"argocd_<CLUSTER_NAME>" = {
109-
cluster_name = "<CLUSTER_NAME>"
110-
principal_arn = "arn:aws:iam::<AWS_ACCOUNT_ID>:role/argocd-<CLUSTER_NAME>"
111-
username = "arn:aws:iam::<AWS_ACCOUNT_ID>:role/argocd-<CLUSTER_NAME>"
109+
cluster_name = "<CLUSTER_NAME>"
110+
principal_arn = "arn:aws:iam::<AWS_ACCOUNT_ID>:role/argocd-<CLUSTER_NAME>"
111+
username = "arn:aws:iam::<AWS_ACCOUNT_ID>:role/argocd-<CLUSTER_NAME>"
112112
policy_associations = {
113113
view_deployments = {
114-
policy_arn = "arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy"
114+
policy_arn = "arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy"
115115
access_scope = {
116116
namespaces = ["default"]
117117
type = "namespace"
@@ -121,12 +121,12 @@ module "eks" {
121121
}
122122

123123
"atlantis_<CLUSTER_NAME>" = {
124-
cluster_name = "<CLUSTER_NAME>"
125-
principal_arn = "arn:aws:iam::<AWS_ACCOUNT_ID>:role/atlantis-<CLUSTER_NAME>"
126-
username = "arn:aws:iam::<AWS_ACCOUNT_ID>:role/atlantis-<CLUSTER_NAME>"
124+
cluster_name = "<CLUSTER_NAME>"
125+
principal_arn = "arn:aws:iam::<AWS_ACCOUNT_ID>:role/atlantis-<CLUSTER_NAME>"
126+
username = "arn:aws:iam::<AWS_ACCOUNT_ID>:role/atlantis-<CLUSTER_NAME>"
127127
policy_associations = {
128128
view_deployments = {
129-
policy_arn = "arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy"
129+
policy_arn = "arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy"
130130
access_scope = {
131131
namespaces = ["default"]
132132
type = "namespace"
@@ -611,13 +611,13 @@ EOT
611611
}
612612

613613
resource "aws_iam_policy" "ssm_access_policy" {
614-
name = "kubefirst-pro-api-ssm-access"
614+
name = "kubefirst-pro-api-ssm-access"
615615
description = "Policy to allow SSM actions for kubefirst-pro-api"
616616
policy = jsonencode({
617617
Version = "2012-10-17",
618618
Statement = [
619619
{
620-
Sid = "Statement1",
620+
Sid = "Statement1",
621621
Effect = "Allow",
622622
Action = [
623623
"ssm:*"
@@ -637,7 +637,7 @@ module "kubefirst_api" {
637637
role_name = "kubefirst-pro-api-${local.name}"
638638
role_policy_arns = {
639639
kubefirst = "arn:aws:iam::aws:policy/AmazonEC2FullAccess",
640-
ssm = aws_iam_policy.ssm_access_policy.arn
640+
ssm = aws_iam_policy.ssm_access_policy.arn
641641
}
642642
assume_role_condition_test = "StringLike"
643643
allow_self_assume_role = true
@@ -735,11 +735,11 @@ resource "aws_iam_policy" "cluster_autoscaler" {
735735
name = "cluster-autoscaler-${local.name}"
736736
path = "/"
737737
policy = jsonencode({
738-
"Version": "2012-10-17",
739-
"Statement": [
738+
"Version" : "2012-10-17",
739+
"Statement" : [
740740
{
741-
"Effect": "Allow",
742-
"Action": [
741+
"Effect" : "Allow",
742+
"Action" : [
743743
"autoscaling:DescribeAutoScalingGroups",
744744
"autoscaling:DescribeAutoScalingInstances",
745745
"autoscaling:DescribeLaunchConfigurations",
@@ -752,7 +752,7 @@ resource "aws_iam_policy" "cluster_autoscaler" {
752752
"autoscaling:SetDesiredCapacity",
753753
"autoscaling:TerminateInstanceInAutoScalingGroup"
754754
],
755-
"Resource": ["*"]
755+
"Resource" : ["*"]
756756
}
757757
]
758758
})
@@ -763,42 +763,42 @@ resource "aws_iam_policy" "vault_dynamodb" {
763763
path = "/"
764764

765765
policy = jsonencode({
766-
"Version": "2012-10-17",
767-
"Statement": [
768-
{
769-
"Effect": "Allow",
770-
"Action": [
771-
"dynamodb:Query",
772-
"dynamodb:DescribeTable",
773-
"dynamodb:GetItem",
774-
"dynamodb:PutItem",
775-
"dynamodb:DeleteItem",
776-
"dynamodb:BatchWriteItem",
777-
"dynamodb:UpdateItem"
778-
],
779-
"Resource": "*"
780-
}
766+
"Version" : "2012-10-17",
767+
"Statement" : [
768+
{
769+
"Effect" : "Allow",
770+
"Action" : [
771+
"dynamodb:Query",
772+
"dynamodb:DescribeTable",
773+
"dynamodb:GetItem",
774+
"dynamodb:PutItem",
775+
"dynamodb:DeleteItem",
776+
"dynamodb:BatchWriteItem",
777+
"dynamodb:UpdateItem"
778+
],
779+
"Resource" : "*"
780+
}
781781
]
782-
})
782+
})
783783
}
784784

785785
resource "aws_iam_policy" "vault_kms" {
786786
name = "vault-kms-${local.name}"
787787
path = "/"
788788

789789
policy = jsonencode({
790-
"Version": "2012-10-17",
791-
"Statement": [
792-
{
793-
"Effect": "Allow",
794-
"Action": [
795-
"kms:DescribeKey",
796-
"kms:Decrypt",
797-
"kms:Encrypt",
798-
"kms:GenerateDataKey"
799-
],
800-
"Resource": "*"
801-
}
790+
"Version" : "2012-10-17",
791+
"Statement" : [
792+
{
793+
"Effect" : "Allow",
794+
"Action" : [
795+
"kms:DescribeKey",
796+
"kms:Decrypt",
797+
"kms:Encrypt",
798+
"kms:GenerateDataKey"
799+
],
800+
"Resource" : "*"
801+
}
802802
]
803-
})
803+
})
804804
}

aws-github/terraform/aws/modules/workload-cluster/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
data "aws_availability_zones" "available" {}
22

33
locals {
4-
cluster_version = "1.29"
4+
cluster_version = "1.31"
55
vpc_cidr = "10.0.0.0/16"
66
azs = slice(data.aws_availability_zones.available.names, 0, 3)
77
tags = {
@@ -78,9 +78,9 @@ module "eks" {
7878
eks_managed_node_groups = {
7979
# Default node group - as provided by AWS EKS
8080
default_node_group = {
81-
desired_size = tonumber(var.node_count) # tonumber() is used for a string token value
82-
min_size = tonumber(1) # tonumber() is used for a string token value
83-
max_size = tonumber(var.node_count)+10 # tonumber() is used for a string token value
81+
desired_size = tonumber(var.node_count) # tonumber() is used for a string token value
82+
min_size = tonumber(1) # tonumber() is used for a string token value
83+
max_size = tonumber(var.node_count) + 10 # tonumber() is used for a string token value
8484
# By default, the module creates a launch template to ensure tags are propagated to instances, etc.,
8585
# so we need to disable it to use the default template provided by the AWS EKS managed node group service
8686
use_custom_launch_template = false

0 commit comments

Comments
 (0)