aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
Need name attribute for AWS::ServiceDiscovery::PrivateDnsNamespace et. al.
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::ServiceDiscovery::PrivateDnsNamespace
### Resource name
_No response_
### Description
I can create a private, internal service discovery namespace like this:
```yaml
DiscoveryNamespace:
Type: AWS::ServiceDiscovery::PrivateDnsNamespace
Properties:
Name: "example.internal"
Vpc: !Ref VPC
```
But later if I want to use the name `example.internal`, how do I refer to it? The [`AWS::ServiceDiscovery::PrivateDnsNamespace`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-privatednsnamespace.html) type seems to have attributes for `Arn`, `HostedZoneId`, and `Id`, but not `Name`.
For example let's say I wanted to output the name of a `AWS::ServiceDiscovery::Service` for `my-service` in this namespace. I might want to do this:
```yaml
Outputs:
ServiceDiscoveryHost:
Description: The DNS resolvable host of the service.
Value: !Sub "${ServiceDiscovery.Name}.${DiscoveryNamespace.Name}"
```
The `${DiscoveryNamespace.Name}` part won't work. You can see that [`AWS::ServiceDiscovery::Service`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html) provides a `Name` attribute. But not `AWS::ServiceDiscovery::PrivateDnsNamespace`. Why not? Isn't the name of the namespace one of its most important components? How can I communicated to other services how to contact this service without copying and hard-coding some string?
[`AWS::ServiceDiscovery::PrivateDnsNamespace`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-privatednsnamespace.html), [`AWS::ServiceDiscovery::PublicDnsNamespace`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-publicdnsnamespace.html), and [`AWS::ServiceDiscovery::HttpNamespace`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-httpnamespace.html) all need to have their own respective `Name` attributes.
### Other Details
_No response_
Contributor guide
Research direction
Start with the linked AWS CloudFormation documentation pages for PrivateDnsNamespace, PublicDnsNamespace, and HttpNamespace, and compare their documented return attributes with Service's Name attribute. Done means each namespace resource exposes its configured Name so it can be referenced in an Output substitution without hard-coding the namespace string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100