aws_servicediscovery: PublicDnsNamespace NS records
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### 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
```python
#!/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_
Contributor guide
Research direction
Start with the Python reproduction using aws_servicediscovery.PublicDnsNamespace and the synthesized stack in app.synth(). Verify how the public namespace creates hosted zones and whether the NS records are linked as described; done means the expected NS record is present and the public namespace resolves through the parent hosted zone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100