Azure / bicep-registry-modules

Bicep registry modules
MIT License
484 stars 337 forks source link

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

Open jikuja opened 2 days ago

jikuja commented 2 days ago

Check 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

      ipAddress: {
        type: ipAddressType
        autoGeneratedDomainNameLabelScope: !empty(dnsNameServers) ? autoGeneratedDomainNameLabelScope : null
        dnsNameLabel: dnsNameLabel
        ports: ipAddressPorts
      }
@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

microsoft-github-policy-service[bot] commented 2 days ago

[!IMPORTANT] The "Needs: Triage :mag:" label must be removed once the triage process is complete!

[!TIP] For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

avm-team-linter[bot] commented 2 days ago

@jikuja, thanks for submitting this issue for the avm/res/container-instance/container-group module!

[!IMPORTANT] A member of the @Azure/avm-res-containerinstance-containergroup-module-owners-bicep or @Azure/avm-res-containerinstance-containergroup-module-contributors-bicep team will review it soon!