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

[Issue] Convert azd templates to use AVM instead of infra/core #3327

Open
jongio opened this issue Feb 9, 2024 · 8 comments · May be fixed by #3976
Open

[Issue] Convert azd templates to use AVM instead of infra/core #3327

jongio opened this issue Feb 9, 2024 · 8 comments · May be fixed by #3976

Comments

@jongio
Copy link
Member

jongio commented Feb 9, 2024

This is an effort to move all of our templates to use AVM instead of our own infra/core. More info on avm can be found here: https://aka.ms/avm

We are tracking individual modules needed for azd here: Azure/Azure-Verified-Modules#261

All AVM modules needed for AZD: https://github.com/Azure/Azure-Verified-Modules/labels/AZD%20%3Atechnologist%3A

@pamelafox
Copy link
Member

Are you still thinking of doing this? We are making various improvements to the Bicep modules we use, and it would be good to know where to put our efforts.

@jongio
Copy link
Member Author

jongio commented May 8, 2024

@pamelafox - Yes, but AVM isn't quite ready to move to yet. There are some missing features. We are tracking it internally. LMK if you want to see it.

@MennoDeee
Copy link

@jongio just to make it clear for myself, say I were to make a new internal AZD template for my team would I be able to make use of the AVM instead of the infra/core modules? The modules my team would need are currently available in AVM or are the missing features you mentioned of a different nature.

@jongio
Copy link
Member Author

jongio commented May 17, 2024

@jongio just to make it clear for myself, say I were to make a new internal AZD template for my team would I be able to make use of the AVM instead of the infra/core modules? The modules my team would need are currently available in AVM or are the missing features you mentioned of a different nature.

You can use avm to build azd templates if they meet your template needs.

We have a project to move all official-ms azd templates to avm, but avm is missing features that is preventing us from moving all our templates.

@eamreyes
Copy link

I'm using AVM and running into an issue with tagging.

https://github.com/Azure/terraform-azurerm-avm-res-web-site

The tags on the module are applied to all created resources, Storage Account, Service Plan, and Function App.

azd-service-name : <My Service Name> is applied to all resources and az deploy can't distinguish the resources.

Where does the solution lie?

  • azd being able to distinguish resource by azd-service-name + host value in azure.yaml
  • OR AVM modifying how tags are applied to resources.

I think I can get around it for now with a postprovision hook to add missing tags to my target function apps.

@jongio
Copy link
Member Author

jongio commented Aug 20, 2024

@v-xuto Can you please have a look at @eamreyes issue?

@Menghua1
Copy link
Member

@eamreyes You can use this function app example: https://registry.terraform.io/modules/Azure/avm-res-web-site/azurerm/latest/examples/function_app to create a Function App. Add tags: azd-service-name : <My Service Name> to the module "test", and the Storage Account and Service Plan will be created separately. In this case, the tags will not be applied to Storage Account and Service Plan. You can try this method.

@rajeshkamal5050 rajeshkamal5050 modified the milestones: Aug 2024, Sep 2024 Sep 4, 2024
@rajeshkamal5050 rajeshkamal5050 modified the milestones: Sep 2024, Selenium Oct 2, 2024
@rajeshkamal5050 rajeshkamal5050 modified the milestone: Selenium Oct 16, 2024
@seesharprun
Copy link

seesharprun commented Nov 7, 2024

I'm using AVM for about 9 Azure Cosmos DB AZD templates. Some use Entra auth end-to-end and one uses Azure Key Vault. It's come a long way since earlier this year.

The huge advantage is that I get to have all of the goodness of AZD, deploy to a resource group, and keep a really slim single main.bicep file that other people can understand quickly. I understand that philosophically this is different than your templates.

I completely understand that it doesn't cover all of your needs yet, but I did want to share an example of how much simpler it makes the main.bicep file when it's available.

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

Successfully merging a pull request may close this issue.

9 participants