Skip to content

Normalize resource_group_name to lowercase#232

Open
jpmicrosoft wants to merge 4 commits into
Azure:mainfrom
jpmicrosoft:fix/normalize-rg-case
Open

Normalize resource_group_name to lowercase#232
jpmicrosoft wants to merge 4 commits into
Azure:mainfrom
jpmicrosoft:fix/normalize-rg-case

Conversation

@jpmicrosoft
Copy link
Copy Markdown

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.

jpmicrosoft and others added 2 commits March 12, 2026 18:33
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>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs: Triage 🔍 Maintainers need to triage still label Mar 12, 2026
@lonegunmanb
Copy link
Copy Markdown
Member

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 resource_group_name to lowercase, so this would be a departure from established patterns across the AVM ecosystem.

Could you share more about the specific scenario where this is causing issues? For example:

  • Is this happening in a context where users don't control the resource group name casing?
  • Are there specific automation workflows where case normalization would be essential?

Understanding the real-world impact would help us evaluate whether this change is the right approach, or if there's a better solution. Thanks!

@jpmicrosoft
Copy link
Copy Markdown
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Triage 🔍 Maintainers need to triage still

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants