Skip to content

Switch to avm for mysql#11

Merged
rujche merged 1 commit into
azure-javaee:feature/sjadfrom
rujche:switch-to-avm-for-mysql
Nov 5, 2024
Merged

Switch to avm for mysql#11
rujche merged 1 commit into
azure-javaee:feature/sjadfrom
rujche:switch-to-avm-for-mysql

Conversation

@rujche

@rujche rujche commented Nov 4, 2024

Copy link
Copy Markdown

Tested the following 4 cases:

var mysqlDatabaseName = '{{ .DbMySql.DatabaseName }}'
var mysqlDatabaseUser = 'mysqladmin'
{{- if (and .DbMySql .DbMySql.AuthUsingManagedIdentity) }}
module mysqlIdentity 'br/public:avm/res/managed-identity/user-assigned-identity:0.2.1' = {

@rujche rujche Nov 4, 2024

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

azCliVersion: '2.63.0'
location: location
managedIdentities: {
userAssignedResourcesIds: [

@rujche rujche Nov 4, 2024

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Here, it is "userAssignedResourcesIds"

highAvailability: 'Disabled'
{{- if (and .DbMySql .DbMySql.AuthUsingManagedIdentity) }}
managedIdentities: {
userAssignedResourceIds: [

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Here, it is userAssignedResourceIds

location: location
managedIdentities: {
userAssignedResourcesIds: [
connectionCreatorIdentity.outputs.resourceId

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I considered using principalId which already exists in the line 16 of current file instead of creating connectionCreatorIdentity. It won't work because here in br/public:avm/res/resources/deployment-script, it only supports managedIdentities, but principalId can be Id of the user or app to assign application roles, it can be a user, not a managed identity.

@rujche
rujche merged commit 030ec5b into azure-javaee:feature/sjad Nov 5, 2024
@rujche
rujche deleted the switch-to-avm-for-mysql branch November 5, 2024 01:42
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.

2 participants