Skip to content

Commit

Permalink
Add var for private hosted zone
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelhar committed Oct 6, 2023
1 parent 368994f commit 42b878a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ jobs:
ssh-keygen -t rsa -f dummy.pem -N ''
export DEPLOY_ID="$NAME"
export MOD_VERSION="v3.0.8"
export MOD_VERSION="v3.0.10"
envsubst < config.tpl | tee config.yaml
./convert.py check-requirements
Expand Down
6 changes: 5 additions & 1 deletion convert/lib/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,11 @@ def get_subnet_ids(subnet_type: str, prefix: str = "VPC"):
eks_cluster_auto_sg = eks_cluster_result["cluster"]["resourcesVpcConfig"]["clusterSecurityGroupId"]

route53_hosted_zone_name = None
route53_hosted_zone_private = False
if r53_zone_ids := self.cdkconfig["route53"]["zone_ids"]:
route53_hosted_zone_name = self.r53.get_hosted_zone(Id=r53_zone_ids[0])["HostedZone"]["Name"]
hosted_zone = self.r53.get_hosted_zone(Id=r53_zone_ids[0])["HostedZone"]
route53_hosted_zone_name = hosted_zone["Name"]
route53_hosted_zone_private = hosted_zone["Config"]["PrivateZone"]

subnet_result = self.ec2.describe_subnets(SubnetIds=get_subnet_ids("Private"))
az_zone_ids = [s["AvailabilityZoneId"] for s in subnet_result["Subnets"]]
Expand Down Expand Up @@ -650,6 +653,7 @@ def get_subnet_ids(subnet_type: str, prefix: str = "VPC"):
"enabled": False,
},
"route53_hosted_zone_name": route53_hosted_zone_name,
"route53_hosted_zone_private": route53_hosted_zone_private,
"bastion": {
"enabled": eks_cluster_result["cluster"]["resourcesVpcConfig"]["endpointPrivateAccess"],
},
Expand Down

0 comments on commit 42b878a

Please sign in to comment.