Skip to content

Commit

Permalink
add cdk support for private subnets detection (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofpa committed Aug 4, 2022
1 parent 909dcb9 commit 42dd822
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 42dd822

Please sign in to comment.