Skip to content

Commit

Permalink
Create delegation only if parent zone is given
Browse files Browse the repository at this point in the history
  • Loading branch information
discordianfish committed Jan 11, 2019
1 parent eedc2c1 commit d720faa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ Mappings:

Conditions:
isExisting: !Equals [ {"Ref": "ClusterState"}, "existing" ]
hasNoParentZone: !Equals [ {"Ref": "ParentZoneID"}, "" ]
hasParentZone: !Not [ { "Condition": "hasNoParentZone" } ]

Resources:
### Private Subnets ###
Expand Down Expand Up @@ -1249,6 +1251,7 @@ Resources:
Type: NS
TTL: 60
ResourceRecords: !GetAtt [ HostedZone, NameServers ]
Condition: hasParentZone

HostedZone:
Type: "AWS::Route53::HostedZone"
Expand Down Expand Up @@ -1354,6 +1357,7 @@ Outputs:
Export:
Name: !Sub "${AWS::StackName}-ParentZoneID"
Value: !Ref ParentZoneID
Condition: hasParentZone
ControllerSubdomain:
Export:
Name: !Sub "${AWS::StackName}-ControllerSubdomain"
Expand Down

0 comments on commit d720faa

Please sign in to comment.