Skip to content

Conversation

@andrewmatveychuk
Copy link
Contributor

Description

  • Added the Azure recipe to provision the resource as an Azure Database for MySQL
  • Added the new type property (tags), as suggested here, and defined the new type version for backward compatibility

Related PR: #46

Testing

From the repository root folder:

  1. Create the type: rad resource-type create -f '.\Data\mySqlDatabases\mySqlDatabases.yaml'
  2. Compile the Bicep extension: rad bicep publish-extension -f '.\Data\mySqlDatabases\mySqlDatabases.yaml' --target '.\Data\mySqlDatabases\radiusResources.tgz'
  3. Add the compiled radiusResources.tgz file to your bicepconfig.json file to enable IntelliSense support in VSCode.
  4. Publish the recipe to a container registry. For example: rad bicep publish --file '.\Data\mySqlDatabases\recipes\azure-database-for-mysql\bicep\azure-database-for-mysql.bicep' --target 'br:ghcr.io/andrewmatveychuk/azure-database-for-mysql:0.54'
  5. Register the recipe in your Radius environment. For example: rad recipe register default --environment default --resource-type 'Radius.Data/mySqlDatabases' --template-kind bicep --template-path 'ghcr.io/andrewmatveychuk/kubernetes-mysql:0.54'
  6. Configure the Azure provider for the environment as described here:
    • The resource group used by the Azure provider should exist.
    • The configured identity should be granted the Contributor role for the target resource group.
  7. Define a sample application using the type, deploy it, and check for resource provisioning in the target resource group. For example:
extension radius
extension radiusResources

@description('The Radius Application ID. Injected automatically by the rad CLI.')
param application string

@description('The env ID of your Radius Environment. Set automatically by the rad CLI.')
param environment string

resource mysql84 'Radius.Data/mySqlDatabases@2025-08-01-preview' = {
  name: 'mysql84'
  properties: {
    environment: environment
    application: application
    database: 'wp_db84'
    username: 'wp_user84'
    version: '8.4'
  }
}

var tags = {
  environment: 'production'
  owner: 'team-b'
}

resource mysql80 'Radius.Data/mySqlDatabases@2025-10-01-preview' = {
  name: 'mysql80'
  properties: {
    environment: environment
    application: application
    database: 'wp_db80'
    username: 'wp_user80'
    version: '8.0'
    tags: tags
  }
}

resource mysql57 'Radius.Data/mySqlDatabases@2025-10-01-preview' = {
  name: 'mysql57'
  properties: {
    environment: environment
    application: application
    database: 'wp_db57'
    username: 'wp_user57'
    version: '5.7'
    tags: {
      'custom-environment': 'test'
      'custom-owner': 'team-a'
    }
  }
}

andrewmatveychuk and others added 30 commits September 18, 2025 16:25
Signed-off-by: Andrew Matveychuk <[email protected]>
Signed-off-by: Andrew Matveychuk <[email protected]>
Implementation of
radius-project/design-notes#110

---------

Signed-off-by: Zach Casper <[email protected]>
Signed-off-by: Andrew Matveychuk <[email protected]>
This PR adds documentation for automated workflow testing. Testing is
only required for stable resource types. The following changes have been
made:

- Move the build folder into .github
- Add documentation for adding tests for stable resource types
- Add documentation for make targets
- Removed bicepconfig.json and generate it during automated workflow
runs

---------

Signed-off-by: sk593 <[email protected]>
Signed-off-by: Andrew Matveychuk <[email protected]>
Signed-off-by: Andrew Matveychuk <[email protected]>
…o major MySQL version property

Signed-off-by: Andrew Matveychuk <[email protected]>
Signed-off-by: Andrew Matveychuk <[email protected]>
Signed-off-by: Andrew Matveychuk <[email protected]>
…ameter tp honor the type specification

Signed-off-by: Andrew Matveychuk <[email protected]>
Co-authored-by: Reshma Abdul Rahim <[email protected]>
Signed-off-by: Andrew Matveychuk <[email protected]>
Co-authored-by: Reshma Abdul Rahim <[email protected]>
Signed-off-by: Andrew Matveychuk <[email protected]>
Co-authored-by: Reshma Abdul Rahim <[email protected]>
Signed-off-by: Andrew Matveychuk <[email protected]>
…ters to account for the inputs from the recipe context object

Signed-off-by: Andrew Matveychuk <[email protected]>
…template generalization

Signed-off-by: Andrew Matveychuk <[email protected]>
This reverts commit e82725d.

Signed-off-by: Andrew Matveychuk <[email protected]>
Signed-off-by: Andrew Matveychuk <[email protected]>
@andrewmatveychuk andrewmatveychuk requested review from a team as code owners October 2, 2025 15:06
@andrewmatveychuk
Copy link
Contributor Author

@Reshrahim @zachcasper Could you please review and let me know your thoughts?

@andrewmatveychuk
Copy link
Contributor Author

The PR to update the documentation for the Azure provider with missing details: radius-project/docs#1539

Copy link
Contributor

@Reshrahim Reshrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

I made some suggestions as I manually tested the Azure Recipe. I was able to deploy but the env variables did not get populated on the container via connections.

…ation for maximum length

Signed-off-by: Andrew Matveychuk <[email protected]>
…operty default values

Signed-off-by: Andrew Matveychuk <[email protected]>
…come the current limitation of working with secrets in Radius

Signed-off-by: Andrew Matveychuk <[email protected]>
@andrewmatveychuk
Copy link
Contributor Author

Thanks for the contribution.

I made some suggestions as I manually tested the Azure Recipe. I was able to deploy but the env variables did not get populated on the container via connections.

FYI, I'm still looking into this, and I'm trying to accomodate the TLS enforcement into the recipe.

@andrewmatveychuk
Copy link
Contributor Author

Thanks for the contribution.

I made some suggestions as I manually tested the Azure Recipe. I was able to deploy but the env variables did not get populated on the container via connections.

@Reshrahim
I think that should work correctly now. It turned out that the databasePort property can only be used as an input parameter and cannot be referenced later, which resulted in an error when deploying the recipe Bicep template directly, rather than via Radius.

@Reshrahim
Copy link
Contributor

@andrewmatveychuk - Can you review https://github.com/radius-project/resource-types-contrib/pull/95/changes#diff-efca8759f11a6cd43d11b7c4f5948402d7d743097b2f08ed6a970d897bfbb618 as a pattern for modeling secrets and start updating the mysql type. This will be published as the guidance on modeling secrets with types once the core types (extensible) are added to the Radius install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants