Normalize resource_group_name to lowercase#232
Conversation
Normalize resource_group_name usage to local.normalized_resource_group_name to ensure consistent casing across resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hi @jpmicrosoft, thanks for this contribution! We appreciate you thinking about case sensitivity issues with resource group names. Before we proceed, we'd like to understand the use case better. In general, when Terraform detects a drift between the declared state and the actual Azure state (including casing differences), that's by design — it signals that the configuration doesn't match reality. The recommended approach is for users to ensure their input matches the actual Azure resource group name exactly. We haven't found other AVM modules that normalize Could you share more about the specific scenario where this is causing issues? For example:
Understanding the real-world impact would help us evaluate whether this change is the right approach, or if there's a better solution. Thanks! |
|
Yes, during the creation of the VM disk the Resource Group name is being changed to all Caps. The user is unable to change this behavior this the change. I hope this help clarify things. Thank you |
Normalize resource_group_name to lowercase inside the module by introducing local.normalized_resource_group_name and using it where resources set resource_group_name. Files changed: locals.tf, main.disks.tf, main.linux_vm.tf, main.windows_vm.tf, main.networking.tf, main.backup.tf.