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
After upgrading to 0.25.3 we discovered that passing in an untyped object to a parameter with a custom type no longer works, even if the untyped object has the required fields. Bicep produces an error directly in the editor if you try this.
To Reproduce
The following sample code mimics a setup we have been using successfully up until and including 0.24.24.
Was this intentionally broken? Perhaps it was a bug that this was allowed, and now the bug is fixed? :)
Additional context
We are using this pattern a lot where we have "data modules" that expose various resources in similar ways. We use union(<resource>, { name: <resource>.name, id: <resource>.id }) since in general the id and name properties are not included otherwise.
The text was updated successfully, but these errors were encountered:
Bicep version
Bicep CLI version 0.25.3 (8627085)
Describe the bug
After upgrading to 0.25.3 we discovered that passing in an untyped object to a parameter with a custom type no longer works, even if the untyped object has the required fields. Bicep produces an error directly in the editor if you try this.
To Reproduce
The following sample code mimics a setup we have been using successfully up until and including 0.24.24.
Create
main.bicep
:Create
data.bicep
:Create
app.bicep
:In
main.bicep
you now have an errorThe specified "object" declaration is missing the following required properties: "id".bicep(BCP035)
:The output from
data.bicep
is an untyped object with the following shape:Was this intentionally broken? Perhaps it was a bug that this was allowed, and now the bug is fixed? :)
Additional context
We are using this pattern a lot where we have "data modules" that expose various resources in similar ways. We use
union(<resource>, { name: <resource>.name, id: <resource>.id })
since in general theid
andname
properties are not included otherwise.The text was updated successfully, but these errors were encountered: