Azure/terraform-azurerm-lz-vending

feat: resource group dependencies

Opened this issue ยท 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

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 just illustrated what i'm looking to accomplish with PR #371