Can experimental bicep features work with azd provision
?
#2760
-
Azure Bicep has added user-defined types as experimental feature. You enable this feature by setting {
"analyzers": {
"core": {
"rules": {
"no-unused-params": {
"level": "error"
}
}
}
},
"experimentalFeaturesEnabled": {
"extensibility": true,
"userDefinedTypes": true,
"compileTimeImports": true
}
} This has allowed me to create some user defined types and import them into my bicep files as need. Here are some simple examples: @export()
@description('The type of environment. sandbox is the default and is used for all non-production environments. dev is used for the development environment.')
type environmentTypes = ('sandbox' | 'dev' | 'test' | 'prod')
@export()
@description('The nurture ohio client')
type nurtureOhioClientType = {
@description('The nurture ohio url')
url: string
@description('The nurture ohio secret')
@secure()
apiKey: string
}
@export()
@description('The epic client')
type epicClientType = {
@description('The epic client id')
id: string
@description('The epic client secret')
@secure()
secret: string
} I can then import these types like so: import { environmentTypes, epicClientType, nurtureOhioClientType } from 'types.bicep' However, when attempting to provision infrastructure via ERROR: initializing provisioning manager: compiling bicep template: failed to compile bicep template: failed running bicep build: exit code: 1, stdout: , stderr: WARNING: Symbolic name support in ARM is experimental, and should be enabled for testing purposes only. Do not enable this setting for any production usage, or you may be unexpectedly broken at any time!
/Users/mueller.128/Developer/comrit/smarrt-ehr-azure/infra/resources.bicep(1,8) : Error BCP201: Expected a provider specification string. Specify a valid provider of format "<providerName>@<providerVersion>". Can I use the azure developer cli tools with biceps experimental features? If so, how? Thanks for any and all info. Kurt |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @kurt-mueller-osumc , |
Beta Was this translation helpful? Give feedback.
Hello @kurt-mueller-osumc ,
We have recently updated bicep-version for
azd
to0.21.1
. This version includes the user-defined types.If you want to give it a try, you can install
azd
directly from that PR (instructions are in the PR).This change will be part of next azd-release.