Azure / Azure/Azure-Verified-Modules

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

Open
#1,457 15 comments 2 reactions 0 assignees View on GitHub
Language: Terraform :globe_with_meridians: Status: Long Term :hourglass_flowing_sand: Type: Question/Feedback :raising_hand:
Dominant language
PowerShell
Stars
580
Forks
161
Avg merge
11h 3m
Merged PRs (30d)
15

Description

### Check for previous/existing GitHub issues

- [X] I have checked 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

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named. Start by reviewing the linked emailservice proposal and the discussion in the postgres flexible server issue, then compare the complex modules referenced in the question. Done means documenting clear criteria for when child resources should use submodules.

Written by the indexing model from the issue text.

Assessment

Tech stack
terraform
Domain
documentation, infrastructure
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.