Skip to content

Bicepparam: resourceInput<> typed parameter throws error when using is configured with ACR #17900

@johnlokerse

Description

@johnlokerse

Bicep version

Bicep CLI version 0.37.4 (27cc8db)

Describe the bug
In the Bicepparam file, I defined the using keyword to reference the Managed DevOps Pools module from an Azure Container Registry. The module has parameters that use types such as string, object, etc., but also resourceInput<>.

In the Bicepparam file, it throws an error stating that the parameter expects a value of type Microsoft.DevOpsInfrastructure/pools, but object is configured. It seems that the resourceInput<> type cannot be handled. I expect it to work in the same way as shown in the main.bicep example below.

[Good] Without errors in a Bicep template (e.g. main.bicep) with a module definition:
Image

[Error] Error when trying to define the organizationProfile parameter in a Bicepparam file:
Image

The module uses the resourceInput<>:

@description('Required. Defines the organization in which the pool will be used.')
param organizationProfile resourceInput<'Microsoft.DevOpsInfrastructure/pools@2025-01-21'>.properties.organizationProfile

To Reproduce
Create a Bicepparam file and paste the code below:

using 'br/public:avm/res/dev-ops-infrastructure/pool:0.7.0'

param organizationProfile = {
  kind: 'AzureDevOps'
  organizations: [
    {
      url: 'https://dev.azure.com/my-org'
    }
  ]
}

Hover over the parameter to see the error.

Additional context

The following workaround works without errors and deploys correctly:

using 'br/public:avm/res/dev-ops-infrastructure/pool:0.7.0'

param organizationProfile = any(
   {
     kind: 'AzureDevOps'
     organizations: [
       {
         url: 'https://dev.azure.com/my-org'
       }
     ]
   }
)

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions