Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the infra/core modules to AVM modules of "todo-python-mongo" #3872

Closed
wants to merge 5 commits into from

Conversation

dotnet-7
Copy link

@dotnet-7 dotnet-7 commented May 8, 2024

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

1. Modules not replaced by AVM

2. Modules replaced by AVM

  • App Service
  • Key Vault
  • App Service Plan
  • Cosmos Mongo

@jongio for notification.

}
}

// The application backend
module api '../../../../../common/infra/bicep/app/api-appservice-python.bicep' = {
name: 'api'
module api 'br/public:avm/res/web/site:0.2.0' = {
Copy link
Member

Choose a reason for hiding this comment

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

I liked having all of these settings in a different file isolated from the user.

IMO this experience is a degredation from previous experience. Can you put these common settings into relevant files, like /app/api.bicp, like we used to have?

And then share those in all the new AVM updated templates.

Copy link
Member

Choose a reason for hiding this comment

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

We are fixing Azure/bicep-registry-modules#1124, it will be configured in the avm relevant service, and the common configuration file is no longer needed.

@v-xuto
Copy link
Member

v-xuto commented May 29, 2024

/azp run azure-dev - repoman

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Menghua1 Menghua1 changed the title Update the infra/core modules to AVM modules Update the infra/core modules to AVM modules of "todo-python-mongo" May 29, 2024
@v-xuto
Copy link
Member

v-xuto commented May 30, 2024

/azp run azure-dev - repoman

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-sdk
Copy link
Collaborator

Repoman Generation Results

Repoman pushed changes to remotes for the following projects:

Project: todo-python-mongo-aca

Remote: azure-samples-staging

Branch: pr/3872

You can initialize this project with:

azd init -t Azure-Samples/todo-python-mongo-aca -b pr/3872

View Changes | Compare Changes


Project: todo-python-mongo-swa-func

Remote: azure-samples-staging

Branch: pr/3872

You can initialize this project with:

azd init -t Azure-Samples/todo-python-mongo-swa-func -b pr/3872

View Changes | Compare Changes


Project: todo-python-mongo

Remote: azure-samples-staging

Branch: pr/3872

You can initialize this project with:

azd init -t Azure-Samples/todo-python-mongo -b pr/3872

View Changes | Compare Changes


Project: todo-python-mongo-terraform

Remote: azure-samples-staging

Branch: pr/3872

You can initialize this project with:

azd init -t Azure-Samples/todo-python-mongo-terraform -b pr/3872

View Changes | Compare Changes


keyvault_name_as_attr(secret.name),
keyvault_client.get_secret(secret.name).value,
)
if secret.name == "AZURE-COSMOS-CONNECTION-STRING":
Copy link
Member

Choose a reason for hiding this comment

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

Why update to only set this secret?

Copy link
Member

Choose a reason for hiding this comment

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

Because when using infra/core/database to create Cosmos Mongo, only one secret named "AZURE-COSMOS-CONNECTION-STRING" will be created in keyVault, the specific code is here.
But now when using AVM to create Cosmos Mongo, multiple secrets are created and the specific code is here. The backend will fail to obtain "AZURE-COSMOS-CONNECTION-STRING" in the secret. It will succeed only when secret.name == "AZURE-COSMOS-CONNECTION-STRING" is specified.

@v-xuto v-xuto closed this Jun 4, 2024
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.

7 participants