azure-dev icon indicating copy to clipboard operation
azure-dev copied to clipboard

Update the infra/core modules to AVM modules

Open Menghua1 opened this issue 1 year ago • 10 comments

Update the infra/core modules to AVM modules for todo-java-mongo.

1. Modules not replaced by AVM

  • Monitoring (app insights) : Missing the feature Microsoft.Portal/dashboards and the output applicationInsights.properties.ConnectionString. AVM issue link: https://github.com/Azure/bicep-registry-modules/issues/1130
  • APIM: Missing features Microsoft.ApiManagement/service/loggers and Microsoft.ApiManagement/service/apis/diagnostics. AVM issue link: https://github.com/Azure/bicep-registry-modules/issues/1124

2. Modules replaced by AVM

  • App Service
  • Key Vault
  • App Service Plan

@jongio for notification.

Menghua1 avatar Mar 04 '24 06:03 Menghua1

Please try to make this work without any modules from infra/core. I want to see what all the gaps look like

jongio avatar Mar 08 '24 22:03 jongio

@jongio We have done this without any modules from infra/core. Three bicep files are now added under infra/bicep/app for the following reasons:

Besides, remove apim service sku config. For Consumption sku type capacity must be specified as 0, but in AVM , only 1 and 2 are allowed.

Menghua1 avatar Mar 13 '24 10:03 Menghua1

@jongio There is a question here that we need to confirm with you. For AVM’s APIM module, compared with the files in infra/core, only the Microsoft.ApiManagement/service/loggers function is missing. However, compared with the infra/app/apim-api.bicep file currently used by this todo-java-mongo template, the Microsoft.ApiManagement/service/apis/diagnostics function is also missing.

Regarding this issue, do you think it is necessary to add the missing feature Microsoft.ApiManagement/service/apis/diagnostics to the issue https://github.com/Azure/bicep-registry-modules/issues/1124?

Menghua1 avatar Mar 26 '24 08:03 Menghua1

@jongio There is a question here that we need to confirm with you. For AVM’s APIM module, compared with the files in infra/core, only the Microsoft.ApiManagement/service/loggers function is missing. However, compared with the infra/app/apim-api.bicep file currently used by this todo-java-mongo template, the Microsoft.ApiManagement/service/apis/diagnostics function is also missing.

Regarding this issue, do you think it is necessary to add the missing feature Microsoft.ApiManagement/service/apis/diagnostics to the issue Azure/bicep-registry-modules#1124?

As a general rule, anything in infra/core that is used by any azd template should be available in AVM. So, in this case yes, we should make that request. Thank you.

jongio avatar Mar 26 '24 19:03 jongio

@jongio There is a question here that we need to confirm with you. For AVM’s APIM module, compared with the files in infra/core, only the Microsoft.ApiManagement/service/loggers function is missing. However, compared with the infra/app/apim-api.bicep file currently used by this todo-java-mongo template, the Microsoft.ApiManagement/service/apis/diagnostics function is also missing. Regarding this issue, do you think it is necessary to add the missing feature Microsoft.ApiManagement/service/apis/diagnostics to the issue Azure/bicep-registry-modules#1124?

As a general rule, anything in infra/core that is used by any azd template should be available in AVM. So, in this case yes, we should make that request. Thank you.

The feature Microsoft.ApiManagement/service/apis/diagnostics is not in the infra/core folder, but in the infra/app/apim-api.bicep file in this todo-java-mongo template. In this case, should this feature be added to AVM?

Menghua1 avatar Mar 27 '24 09:03 Menghua1

@jongio There is a question here that we need to confirm with you. For AVM’s APIM module, compared with the files in infra/core, only the Microsoft.ApiManagement/service/loggers function is missing. However, compared with the infra/app/apim-api.bicep file currently used by this todo-java-mongo template, the Microsoft.ApiManagement/service/apis/diagnostics function is also missing. Regarding this issue, do you think it is necessary to add the missing feature Microsoft.ApiManagement/service/apis/diagnostics to the issue Azure/bicep-registry-modules#1124?

As a general rule, anything in infra/core that is used by any azd template should be available in AVM. So, in this case yes, we should make that request. Thank you.

The feature Microsoft.ApiManagement/service/apis/diagnostics is not in the infra/core folder, but in the infra/app/apim-api.bicep file in this todo-java-mongo template. In this case, should this feature be added to AVM?

The RPs used in apim-api.bicep should have equivalent AVM modules.

For example, We use Microsoft.ApiManagement/service/apis/policies here: https://github.com/Azure-Samples/todo-java-mongo/blob/main/infra/app/apim-api.bicep#L47

That type should be available in AVM for us to use.

We shouldn't get all of apim-api.bicep into AVM because that is app specific. But the RP types it uses should be available in AVM.

jongio avatar Mar 28 '24 18:03 jongio

@jongio There is a question here that we need to confirm with you. For AVM’s APIM module, compared with the files in infra/core, only the Microsoft.ApiManagement/service/loggers function is missing. However, compared with the infra/app/apim-api.bicep file currently used by this todo-java-mongo template, the Microsoft.ApiManagement/service/apis/diagnostics function is also missing. Regarding this issue, do you think it is necessary to add the missing feature Microsoft.ApiManagement/service/apis/diagnostics to the issue Azure/bicep-registry-modules#1124?

As a general rule, anything in infra/core that is used by any azd template should be available in AVM. So, in this case yes, we should make that request. Thank you.

The feature Microsoft.ApiManagement/service/apis/diagnostics is not in the infra/core folder, but in the infra/app/apim-api.bicep file in this todo-java-mongo template. In this case, should this feature be added to AVM?

The RPs used in apim-api.bicep should have equivalent AVM modules.

For example, We use Microsoft.ApiManagement/service/apis/policies here: https://github.com/Azure-Samples/todo-java-mongo/blob/main/infra/app/apim-api.bicep#L47

That type should be available in AVM for us to use.

We shouldn't get all of apim-api.bicep into AVM because that is app specific. But the RP types it uses should be available in AVM.

Ok, I have added Microsoft.ApiManagement/service/apis/diagnostics fearture to AVM issue https://github.com/Azure/bicep-registry-modules/issues/1124. Thank you.

Menghua1 avatar Mar 29 '24 05:03 Menghua1

@Menghua1 - This https://github.com/Azure/bicep-registry-modules/issues/632 has been implemented. Can you please have a look?

jongio avatar Mar 29 '24 13:03 jongio

@Menghua1 - This Azure/bicep-registry-modules#632 has been implemented. Can you please have a look?

Ok, we have tested it without any problems and in this PR we have updated the code to implement Azure/bicep-registry-modules#632 this way to set keyvault secrets for connection strings.

Menghua1 avatar Apr 01 '24 03:04 Menghua1

Repoman Generation Results

Repoman pushed changes to remotes for the following projects:

Project: todo-java-mongo

Remote: azure-samples-staging

Branch: pr/3464

You can initialize this project with:

azd init -t Azure-Samples/todo-java-mongo -b pr/3464

View Changes | Compare Changes


azure-sdk avatar May 30 '24 06:05 azure-sdk