From 42dd82229aa5c012087fce71592cb84cec5f54b3 Mon Sep 17 00:00:00 2001 From: Theofilos Papapanagiotou Date: Fri, 5 Aug 2022 02:04:55 +0300 Subject: [PATCH] add cdk support for private subnets detection (#295) --- tests/e2e/utils/rds-s3/auto-rds-s3-setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/e2e/utils/rds-s3/auto-rds-s3-setup.py b/tests/e2e/utils/rds-s3/auto-rds-s3-setup.py index 441e090140..65c50584d1 100644 --- a/tests/e2e/utils/rds-s3/auto-rds-s3-setup.py +++ b/tests/e2e/utils/rds-s3/auto-rds-s3-setup.py @@ -232,8 +232,13 @@ def get_cluster_private_subnet_ids(eks_client, ec2_client): private_subnets = [] for subnet in subnets: for tags in subnet["Tags"]: + # eksctl generated clusters if "SubnetPrivate" in tags["Value"]: private_subnets.append(subnet) + # cdk generated clusters + if "aws-cdk:subnet-type" in tags["Key"]: + if "Private" in tags["Value"]: + private_subnets.append(subnet) def get_subnet_id(subnet): return subnet["SubnetId"]