You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Resource specific user-defined types are described in their own bicep stored in a bicep registry. These are then referenced in a user-defined type for the main deployment that describes the resource group that houses these resources, as following:
Of course, several of these resources have nested sub-types that have a discriminator. When referencing the resourceType directly from a local file (resourceBicepLocation in main.types.bicep is 'resource.types.bicep') and then publishing main.bicep this all works as it should. When referencing the resourceType from the bicep in bicep registry (resourceBicepLocation in main.types.bicep is a br: address) the nested type with discriminator doesn't load, instead it loads as all properties being *: any
To Reproduce
Steps to reproduce the behavior:
test1.bicep:
import { mainType } from'main.types.bicep'parammainmainTypeoutputmainOutobject = main
when publishing main.bicep in this form to a bicep registry and referencing from a bicepparam, the subType is loaded correctly. When instead the test1.bicep is published to a private registry, main.types.bicep is edited to reference the file from the registry, and then main.bicep is published to a private registry, the subType is loaded as *: any
Additional context
I understand that this is a niche issue, but it does allow me to limit the amount of duplicate code in a registry
The text was updated successfully, but these errors were encountered:
Bicep version
Bicep CLI version 0.26.54 (5e20b29)
Describe the bug
Resource specific user-defined types are described in their own bicep stored in a bicep registry. These are then referenced in a user-defined type for the main deployment that describes the resource group that houses these resources, as following:
resource.types.bicep:
main.types.bicep:
main.bicep:
Of course, several of these resources have nested sub-types that have a discriminator. When referencing the resourceType directly from a local file (resourceBicepLocation in main.types.bicep is 'resource.types.bicep') and then publishing main.bicep this all works as it should. When referencing the resourceType from the bicep in bicep registry (resourceBicepLocation in main.types.bicep is a
br:
address) the nested type with discriminator doesn't load, instead it loads as all properties being*: any
To Reproduce
Steps to reproduce the behavior:
test1.bicep:
main.types.bicep
main.bicep
when publishing main.bicep in this form to a bicep registry and referencing from a bicepparam, the
subType
is loaded correctly. When instead the test1.bicep is published to a private registry, main.types.bicep is edited to reference the file from the registry, and then main.bicep is published to a private registry, thesubType
is loaded as*: any
Additional context
I understand that this is a niche issue, but it does allow me to limit the amount of duplicate code in a registry
The text was updated successfully, but these errors were encountered: