Extender resource
Overview
An extender resource could be used to bring in a custom resource into Radius for which there is no first class support to “extend” the Radius functionality. The resource can define arbitrary key-value pairs and secrets. These properties and secret values can then be used to connect it to other Radius resources.
Resource format
extension radius
param application string
param environment string
// EXTENDER
resource twilio 'Applications.Core/extenders@2023-10-01-preview' = {
name: 'twilio'
properties: {
application: application
environment: environment
recipe: {
name: 'twilio'
}
}
}
//EXTENDER
resource publisher 'Applications.Core/containers@2023-10-01-preview' = {
name: 'publisher'
properties: {
application: application
container: {
image: 'ghcr.io/radius-project/magpiego:latest'
env: {
TWILIO_NUMBER: {
value: twilio.properties.fromNumber
}
TWILIO_SID: {
value: twilio.listSecrets().accountSid
}
TWILIO_ACCOUNT: {
value: twilio.listSecrets().authToken
}
}
}
}
}
resource twilio 'Applications.Core/extenders@2023-10-01-preview' = {
name: 'twilio'
properties: {
application: app.id
environment: environment
resourceProvisioning: 'manual'
fromNumber: '222-222-2222'
secrets: {
accountSid: 'sid'
authToken: 'token'
}
}
}
Top-level
Key | Required | Description | Example |
---|---|---|---|
name | y | The name of your resource. | mongo |
location | y | The location of your resource. See common values for more information. | global |
properties | y | Properties of the resource. | See below |
Properties
Key | Required | Description | Example |
---|---|---|---|
<user-defined key-value pairs> | n | User-defined properties of the extender. Can accept any key name except ‘secrets’. | fromNumber: '222-222-2222' |
secrets | n | Secrets in the form of key-value pairs | password: '******' |
resourceProvisioning | n | Specifies how to build the resource. Options are to build automatically via ‘recipe’ or build manually via ‘manual’. Selection determines which set of fields to additionally require. | manual |
recipe | n | The recipe to deploy. | See below |
Recipe
Property | Required | Description | Example(s) |
---|---|---|---|
name | n | Specifies the name of the Recipe that should be deployed. If not set, the name defaults to default . |
name: 'twilio' |
parameters | n | An object that contains a list of parameters to set on the Recipe. | { fromNumber: '222-222-2222' } |
Methods
The following methods are available on the Extender resource:
Method | Description |
---|---|
.listSecrets(‘SECRET_NAME’) | Get the value of a secret. |
Resource provisioning
Provision with a Recipe
Recipes automate infrastructure provisioning using approved templates. You can specify a Recipe name that is registered in the environment or omit the name and use the “default” Recipe.
Parameters can also optionally be specified for the Recipe.
Provision manually
If you want to manually manage your infrastructure provisioning outside of Recipes, you can set resourceProvisioning
to 'manual'
and provide all necessary parameters and values in order for Radius to be able to deploy/connect to the desired infrastructure.
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.