terraform-azurerm-lz-vending icon indicating copy to clipboard operation
terraform-azurerm-lz-vending copied to clipboard

feat: resource group dependencies

Open kewalaka opened this issue 10 months ago • 2 comments

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Consider the scenario where the module is used to create resource group, with the intention these are used by components such as umi's and vnets.

This can be almost be accomplished by setting the resource_group_creation_enabled flag and passing in the name of the RG, except there is no dependency in place between these resources and the RG module, and thus it can fail.

Q. Is this approach valid, are we at risk of introducing unnecessary dependencies?

Describe the solution you'd like

Proposal is to add dependencies on the RG module. It would also be good to add the RGs to the outputs so components external to the module can make use of them.

Currently I create the resource groups outside the LZ module.

Additional context

kewalaka avatar Apr 13 '24 03:04 kewalaka

Hi @kewalaka

At the moment the submodule create their own RGs, e.g. vnet/umi.

Is there another scenario that you would like?

matt-FFFFFF avatar Apr 25 '24 13:04 matt-FFFFFF

@matt-FFFFFF just illustrated what i'm looking to accomplish with PR #371

kewalaka avatar Apr 25 '24 23:04 kewalaka

hi @matt-FFFFFF - i didn't directly answer your question but it is in the PR linked above, namely the scenario is to have a single RG for LZ resources such as the vnet/umi rather than a separate one for each. Especially when doing "resource group vending" - having so many small-scoped RGs becomes a bit overwhelming.

The use case is illustrated on https://github.com/Azure/terraform-azurerm-lz-vending/pull/371

Unless i'm missing something this looks like a reasonable non-contentious one to land (famous last words 😅)

kewalaka avatar Oct 07 '24 04:10 kewalaka