-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_virtual_machine: make the vm_size
property case insensitive
#1073
Comments
Hello @rohrerb, This is a common issue in the azure provider. Many of the fields are case insensitive but because terraform defaults to case sensitive we need to specifically have them ignore case. If you can provide a list of fields that should be case insensitive it wouldn't take to much effort to switch them to ignore case. |
The two that haunt us are ResourceGroup and VM Size. Thank you |
Hi @rohrerb, I took a closer look at this today and I am on the wrong track for these properties, they do not have the issue I was thinking of. I checked the With respect to resource groups, in some API's they are case sensitive, in some they are not. However if you use the same case everywhere in your terraform you should not be being prompted to modify any resources on plan. Please don't hesitate to let me know if this advice doesn't help 🙂 |
It does seem to be a mix of portal/tf usage that inflicts this, but that doesn't seem like a good reason not to fix it? :) |
@clangaxon Terraform as a whole is case-sensitive - the Azure Provider's a little more lenient due to Azure being inconsistent in some places; that said I think the solution here is to be consistent internally with how we represent fields. As @katbyte has mentioned, Resource Group names are generally case sensitive - as such Terraform should be requiring users to match the casing (as it's doing). In this instance we could probably make the VM Size field case insensitive since it's case-insensitive within Azure (at least, in all the API endpoints that I'm aware of). Given other Providers API's can be case sensitive - we have no plans to introduce an Thanks! |
vm_size
property case insensitive
I haven't experienced resource group names requiring a case-sensitive match before - perhaps someone from Microsoft can chime in? I'd prefer it was fixed without resorting to a new attribute anyway - it seems like this is something that should 'just work' in accordance with the Azure APIs. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
This issue was originally opened by @rohrerb as hashicorp/terraform#17757. It was migrated here as a result of the provider split. The original body of the issue is below.
Hello,
We often run into case issues with Azure RM Provider and we are forced to use ignore_changes under life cycle . We often see issues with VM Size, we may use Standard_DS12_v2 and that works for creation. When we then do another plan it wants to resize the vm because it sees the size as Standard_DS12_V2.
It would nice to have a ignore_casing under life cycle that we can leverage to ignore any case difference. We can use ignore changes, but we honestly want to know if the VM size has changed.
***We see this on many other fields as well, but vm size and other resource names are the ones that hit us the most. It would be easier to just ignore casing than to keep having to remove / re-add state over and over again.
-Thank you
The text was updated successfully, but these errors were encountered: