Creating NS Record without specifying the TTL gives a poor error message and doesn't match up with the documentation.
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Bicep version**
0.4.1272
**Describe the bug**
When creating an NS-Record, you get a "Request was invalid" error when you don't specify the TTL in the "properties" object. In the documentation, TTL is not classified as "required" but appears to be in this situation
**To Reproduce**
```bicep
resource mainZone 'Microsoft.Network/dnsZones@2018-05-01' = {
location: 'global'
name: 'parent.com'
}
resource childZone 'Microsoft.Network/dnsZones@2018-05-01' = {
name: 'child.parent.com'
location: 'global'
}
resource nameServer 'Microsoft.Network/dnsZones/NS@2018-05-01' = {
name: 'child'
parent: mainZone
properties: {
NSRecords: [
{
nsdname: childZone.properties.nameServers[0]
}
{
nsdname: childZone.properties.nameServers[1]
}
{
nsdname: childZone.properties.nameServers[2]
}
{
nsdname: childZone.properties.nameServers[3]
}
]
}
}
```
I'd expect an error to state that TTL is a required field and the documentation to also reference this.
Contributor guide
Research direction
Reproduce the NS-record deployment from the issue and compare the Azure DNS documentation for Microsoft.Network/dnsZones/NS@2018-05-01. Determine whether the missing TTL is validated by Bicep or the Azure API; done means the failure explains the required field and the corresponding documentation matches that behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- cloud, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100