Overview: Bicep configuration
Categories:
To use the features provided by the official Bicep compiler with Radius, certain configurations need to be defined. These are defined in a bicepconfig.json file that lives in your application’s directory.
What is a bicepconfig.json?
The bicepconfig.json allows the Bicep compiler to consume and use Radius-types stored in an OCI registry. There are two extensions that are enabled by default in the bicepconfig.json so that you can use Radius and AWS resources. The “radius” extension contains the schema information for all Radius-maintained resources, and the “aws” extension contains the schema information for AWS resources. You can optionally add any other settings that are relevant to your application. There are two ways to generate a bicepconfig.json with Radius.
Automatically generate a bicepconfig.json via rad init
-
Install Radius CLI
-
Create a new directory for your app and navigate into it:
mkdir first-app cd first-app -
Initialize Radius. Select
Yeswhen asked to setup application in the current directory.rad init
This will automatically generate a bicepconfig.json with the correct setup in your application’s directory.
Manually create a bicepconfig.json
- Create a
bicepconfig.jsonin your application’s directory.release-versionshould correspond to the current release version in the form ofmajor.minor(e.g.0.36).
{
"experimentalFeaturesEnabled": {
"extensibility": true
},
"extensions": {
"radius": "br:biceptypes.azurecr.io/radius:<release-version>",
"aws": "br:biceptypes.azurecr.io/aws:<release-version>"
}
}
Author and deploy Radius-types
Replace import statements with extension
Radius is now merged with the Bicep. If you have bicep files with the following import statements, please replace them as needed.
- Change
import radius as radiustoextension radius - Change
import aws as awstoextension aws - Change
import kubernetes as kubernetes {}toextension kubernetes with {} as kubernetes
Once you have a bicepconfig.json file in your application’s directory, you can author and deploy Radius-types.
extension radius
@description('The environment ID of your Radius Application. Set automatically by the rad CLI.')
param environment string
resource myapp 'Applications.Core/applications@2023-10-01-preview' = {
name: 'my-application'
properties: {
environment: environment
}
}
Feedback
Was this page helpful?
Glad to hear it! Please feel free to star our repo and join our Discord server to stay up to date with the project.
Sorry to hear that. If you would like to also contribute a suggestion visit and tell us how we can improve.