Azure / Azure-Verified-Modules

Azure Verified Modules (AVM) is an initiative to consolidate and set the standards for what a good Infrastructure-as-Code module looks like. Modules will then align to these standards, across languages (Bicep, Terraform etc.) and will then be classified as AVMs and available from their respective language specific registries.
https://aka.ms/AVM
MIT License
341 stars 81 forks source link

[Question/Feedback]: use of submodules for child resources #1457

Open kewalaka opened 2 weeks ago

kewalaka commented 2 weeks ago

Check for previous/existing GitHub issues

Description

Looking for guidance on whether child resources should generally be a submodule. I see this used in some of the more complex modules and it makes sense.

I've also seen it used in this proposal where it is more of a wrapper

https://github.com/Azure/terraform-azurerm-avm-res-communication-emailservice/tree/krbar/initialModuleVersion

I understand submodules provide potential for role separation , i.e. in theory a child resource could be made for an existing parent.

Was wondering if submodules for child resources are preferred or what criteria should guide their use.

Question came up here:

https://github.com/Azure/terraform-azurerm-avm-res-dbforpostgresql-flexibleserver/issues/8

microsoft-github-policy-service[bot] commented 2 weeks ago

[!IMPORTANT] The "Needs: Triage :mag:" label must be removed once the triage process is complete!

[!TIP] For additional guidance on how to triage this issue/PR, see the AVM Issue Triage documentation.