Azure / Azure/bicep-registry-modules
[AVM Module Issue]: avm/res/container-instance/container-group autoGeneratedDomainNameLabelScope paramter usage
- Dominant language
- Bicep
- Stars
- 736
- Forks
- 564
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 30
Description
### Check for previous/existing GitHub issues
- [x] I have checked for previous/existing GitHub issues
### Issue Type?
Bug
### Module Name
avm/res/container-instance/container-group
### (Optional) Module Version
_No response_
### Description
Module autoGeneratedDomainNameLabelScope and dnsNameServers has really weird interaction
```Bicep
ipAddress: {
type: ipAddressType
autoGeneratedDomainNameLabelScope: !empty(dnsNameServers) ? autoGeneratedDomainNameLabelScope : null
dnsNameLabel: dnsNameLabel
ports: ipAddressPorts
}
````
```Bicep
@description('Optional. Specify level of protection of the domain name label.')
@allowed([
'Noreuse'
'ResourceGroupReuse'
'SubscriptionReuse'
'TenantReuse'
'Unsecure'
])
param autoGeneratedDomainNameLabelScope string = 'TenantReuse'
@description('Optional. The Dns name label for the resource.')
param dnsNameLabel string?
@description('Optional. List of dns servers used by the containers for lookups.')
param dnsNameServers array?
```
Why usage of domain label protection level requires parameter `dnsNameServers`?
Also documentation should mention autoGeneratedDomainNameLabelScope condition if dnsNameServers is needed. Now template's default setting of `autoGeneratedDomainNameLabelScope` is being ignored unless dnsNameServers is configured.
### (Optional) Correlation Id
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.