Open kevball2 opened 6 months 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.
[!NOTE] This label was added as per ITA06.
@Azure/avm-core-team-technical-terraform, can you please take a look at this inquiry? Thanks!
Check for previous/existing GitHub issues
Description
Wanted to start a discussion around testing in terraform AVM modules. l started investigating the TF testing framework and creating some unit tests around variable validation.
Looking at the style guide there is not a lot of defined information yet around what kinds of unit tests we should be looking to create. I started with testing our variable validations to ensure that there was coverage if a validation changed. This lead to the creation of many more tests than I expected. For just the resource group name there were 5 tests to confirm various potential values. All these tests still need to run during the plan phase which would be when the built in TF validation will run.
This brought up several questions:
Hoping for some feedback on what others are doing and any future plans for testing in general.