terraform-k8s icon indicating copy to clipboard operation
terraform-k8s copied to clipboard

v19: Remove `node_security_group_additional_rules` and add `cluster_endpoint_public_access = true`

Open lwbt opened this issue 1 year ago • 0 comments

For learners who struggle to upgrade to most recent version numbers, here is a hint based on 06_terraform_envs_customised:

$  diff -up main.tf main_v19.tf 
--- main.tf	2023-04-11 12:07:31.933612969 +0200
+++ main_v19.tf	2023-04-13 21:37:57.794521841 +0200
@@ -66,13 +66,15 @@ module "vpc" {
 
 module "eks" {
   source  = "terraform-aws-modules/eks/aws"
-  version = "18.30.3"
+  version = "19.13.0"
 
   cluster_name    = "eks-${var.cluster_name}"
   cluster_version = "1.24"
   subnet_ids        = module.vpc.private_subnets
   vpc_id = module.vpc.vpc_id
 
+  cluster_endpoint_public_access = true
+
   eks_managed_node_groups = {
     first = {
       desired_capacity = 1
@@ -82,16 +84,6 @@ module "eks" {
       instance_type = var.instance_type
     }
   }
-  node_security_group_additional_rules = {
-    ingress_allow_access_from_control_plane = {
-      type                          = "ingress"
-      protocol                      = "tcp"
-      from_port                     = 9443
-      to_port                       = 9443
-      source_cluster_security_group = true
-      description                   = "Allow access from control plane to webhook port of AWS load balancer controller"
-    }
-  }
 }
 
 resource "aws_iam_policy" "worker_policy" {

See https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/UPGRADE-19.0.md

lwbt avatar Apr 13 '23 19:04 lwbt