Skip to content

Commit

Permalink
add cdk support for private subnets detection (awslabs#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofpa authored and surajkota committed Aug 6, 2022
1 parent 3d50357 commit 8465d8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/e2e/utils/rds-s3/auto-rds-s3-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 8465d8c

Please sign in to comment.