Describe the bug
When creating a public Service Discovery namespace, the nameserver records are not added to the hosted zone. There doesn't appear to be a way to get the hosted zone ID created from the public Service Discovery namespace. For the example below, NS records are not added to the hosted zone for "sub2.sub1.mydomain.com". A hosted zone is added for "sub3.sub2.sub1.mydomain.com" but the NS records from this HZ are not linked to the HZ for "sub2.sub1.mydomain.com".
Expected Behavior
NS record(s) for sub3.sub2.sub1.mydomain.com is added to HZ for sub2.sub1.mydomain.com
Current Behavior
NS records not added, public Service Discovery namespace fails DNS look-ups
Reproduction Steps
#!/usr/bin/env python3
from constructs import Construct
from aws_cdk import App, Environment, Stack, CfnOutput
from aws_cdk import (aws_servicediscovery as sd)
class SampleStack(Stack):
def __init__(self, scope: Construct, id: str, **kwargs) -> None:
super().__init__(scope, id, **kwargs)
# This FQDN is a hosted zone in the target account
fqdn = "sub2.sub1.mydomain.com"
service_discovery_subdomain = "sub3"
# Does not add NS records to hosted zone $fqdn
service_discovery = sd.PublicDnsNamespace(
self,
"service-discovery",
name=f"{service_discovery_subdomain}.{fqdn}")
CfnOutput(
self,
"service-discovery-namespace-name",
value=service_discovery.namespace_name,
export_name="SDNSName")
env = Environment(account="111111111111", region='us-east-1')
app = App()
lambda_stack = SampleStack(app, "sample-stack", env=env)
app.synth()
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.25.0 (build ae1cb4b)
Framework Version
No response
Node.js Version
v14.19.1
OS
Windows
Language
Python
Language Version
No response
Other information
No response
Describe the bug
When creating a public Service Discovery namespace, the nameserver records are not added to the hosted zone. There doesn't appear to be a way to get the hosted zone ID created from the public Service Discovery namespace. For the example below, NS records are not added to the hosted zone for "sub2.sub1.mydomain.com". A hosted zone is added for "sub3.sub2.sub1.mydomain.com" but the NS records from this HZ are not linked to the HZ for "sub2.sub1.mydomain.com".
Expected Behavior
NS record(s) for sub3.sub2.sub1.mydomain.com is added to HZ for sub2.sub1.mydomain.com
Current Behavior
NS records not added, public Service Discovery namespace fails DNS look-ups
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.25.0 (build ae1cb4b)
Framework Version
No response
Node.js Version
v14.19.1
OS
Windows
Language
Python
Language Version
No response
Other information
No response