Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
373 stars 168 forks source link

Update the infra/core modules to AVM modules of "todo-java-mongo" #3464

Open Menghua1 opened 2 months ago

Menghua1 commented 2 months ago

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

1. Modules not replaced by AVM

2. Modules replaced by AVM

@jongio for notification.

jongio commented 2 months ago

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

Menghua1 commented 2 months ago

@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 commented 2 months ago

@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?

jongio commented 2 months ago

@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.

Menghua1 commented 2 months ago

@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?

jongio commented 2 months ago

@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.

Menghua1 commented 2 months ago

@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.

jongio commented 2 months ago

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

Menghua1 commented 2 months ago

@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.

azure-sdk commented 2 days ago

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