Azure / Azure/bicep-registry-modules

[AVM Module Issue]: avm/res/container-instance/container-group autoGeneratedDomainNameLabelScope paramter usage

Open
#3,501 10 comments 0 reactions 1 assignee Claimed by @JPEasier View on GitHub
Class: Resource Module :package: Needs: Immediate Attention :bangbang: Needs: Triage :mag: Status: Response Overdue :triangular_flag_on_post: Type: AVM :a: :v: :m: Type: Bug :bug:
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.