Overview: Bicep configuration

Setup the Bicep configuration file to author and deploy Radius-types

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

  1. Install Radius CLI

  2. Create a new directory for your app and navigate into it:

    mkdir first-app
    cd first-app
    
  3. Initialize Radius. Select Yes when 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

  1. Create a bicepconfig.json in your application’s directory. release-version should correspond to the current release version in the form of major.minor (e.g. 0.36).
{
	"experimentalFeaturesEnabled": {
		"extensibility": true,
		"extensionRegistry": true,
		"dynamicTypeLoading": true
	},
	"extensions": {
		"radius": "br:biceptypes.azurecr.io/radius:<release-version>",
		"aws": "br:biceptypes.azurecr.io/aws:<release-version>"
	}
}

Author and deploy Radius-types

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
  }
}